Skip to content

Commit

Permalink
fix update-cli path is removing the extension that make windows updat…
Browse files Browse the repository at this point in the history
…e fail
  • Loading branch information
hugomontero committed May 9, 2024
1 parent 79d24e5 commit 22aa6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/update-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class UpdateCliCommand {
async replaceCLI(newCliPath) {
// rename the original CLI
const binPath = this.getBinaryPath();
const fileName = path.basename(process.execPath, path.extname(process.execPath));
const cliPath = path.join(binPath, fileName);
const fileName = path.basename(process.execPath);
const cliPath = process.execPath;
const oldCliPath = path.join(binPath, `${fileName}.old`);
await fs.move(cliPath, oldCliPath, { overwrite: true });
await fs.move(newCliPath, cliPath);
Expand Down

0 comments on commit 22aa6a8

Please sign in to comment.