Skip to content

Commit

Permalink
Fix windows postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
DZakh authored and Roland Peelen committed Jan 2, 2024
1 parent 456b8d2 commit b643e12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const installMacLinuxBinary = (binary) => {
};

const installWindowsBinary = () => {
const source = path.join(__dirname, "ppx-windows.exe");
const source = path.join(__dirname, "rewatch-windows.exe");
if (fs.existsSync(source)) {
const target = path.join(__dirname, "rewatch.exe");
fs.renameSync(source, target);

// windows scripts use a different file extension to executables
// so we delete the script to make sure windows uses the exe now
const windowsScript = path.join(__dirname, "ppx.cmd");
const windowsScript = path.join(__dirname, "rewatch.cmd");
fs.unlinkSync(windowsScript);
} else {
// assume we're in dev mode - nothing will break if the script
Expand Down

0 comments on commit b643e12

Please sign in to comment.