Skip to content

Commit

Permalink
fix: fix sshpass again
Browse files Browse the repository at this point in the history
  • Loading branch information
KP2048 committed Feb 20, 2023
1 parent 789c2d3 commit 2d2c4d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ function deploy(args: yargs.ArgumentsCamelCase<{ reload: boolean, dev: boolean }
deck = new Deck(require(path.join(process.cwd(), '.vscode', 'settings.json')));
} else throw new Error(`${path.join(process.cwd(), 'deck.json')} or ${path.join(process.cwd(), '.vscode', 'settings.json')} does not exist`);
build(args)
const sshpass = `sshpass -P "Enter passphrase for key '${deck.deckkey.replace('$HOME', process.env.HOME ? process.env.HOME:'')}':" -p ${deck.decksshpass}`
const sshpass = `sshpass -P "Enter passphrase for key" -p "${deck.decksshpass}"`
const deploy = path.join(process.cwd(), 'build', `${plugin.name}-${package_.version}${args.dev ? '-dev':''}`);
child_process.execSync(`${sshpass} ssh deck@${deck.deckip} -p ${deck.deckport} ${deck.deckkey.replace('$HOME', process.env.HOME ? process.env.HOME:'')} 'mkdir -p ${deck.deckdir}/homebrew/pluginloader && mkdir -p ${deck.deckdir}/homebrew/plugins'`)
child_process.execSync(`${sshpass} ssh deck@${deck.deckip} -p ${deck.deckport} ${deck.deckkey.replace('$HOME', process.env.HOME ? process.env.HOME:'')} 'echo "${deck.deckpass}" | sudo -S chmod -R ug+rw ${deck.deckdir}/homebrew/'`)
Expand Down

0 comments on commit 2d2c4d0

Please sign in to comment.