Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!isSSHGenerateResponse(res)) {
throw 'todo'; // TODO
}
tasks.next('writing ssh keys');
await Promise.all([
fsWriteFile(keyPath, res.data.key),
fsWriteFile(pubkeyPath, res.data.pubkey)
]);
tasks.end();
this.env.log.info(`${ICON_SUCCESS_GREEN} A new pair of SSH keys has been downloaded to your computer!\n`
+ `${indent()}Private Key (${chalk.bold(prettyPath(keyPath))}): Keep this in a safe spot (such as ${chalk.bold('~/.ssh/')}).\n`
+ `${indent()}Public Key (${chalk.bold(prettyPath(pubkeyPath))}): Give this to all your friends!`);
}
}