Skip to content

Commit

Permalink
fix: knoxctl command
Browse files Browse the repository at this point in the history
  • Loading branch information
swarit-pandey committed Aug 29, 2024
1 parent aef4e63 commit 79290b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ async function installKnoxctl(version?: string): Promise<void> {
log("Running knoxctl installation script...");
const installArgs = ["-b", "/usr/local/bin"];
if (version) {
installArgs.push("-v", version);
// Prepend 'v' to the version if it's not already there
const versionArg = version.startsWith("v") ? version : `v${version}`;
installArgs.push(versionArg);
}
await exec.exec(`sudo ./${installScript}`, installArgs);

Expand Down

0 comments on commit 79290b7

Please sign in to comment.