more spaghetti at the wall

This commit is contained in:
Demitrious Kelly 2020-03-25 15:15:12 -07:00
parent 2863e02eda
commit 034d210969
2 changed files with 8 additions and 8 deletions

8
dist/index.js vendored
View File

@ -667,10 +667,10 @@ function run() {
const userArguments = getUserArguments();
if ('' !== userArguments.knownHosts) {
try {
yield exec.exec(`mkdir -v -p $HOME/.ssh`);
yield exec.exec(`chmod 700 $HOME/.ssh`);
yield exec.exec(`echo ${userArguments.knownHosts} > $HOME/.ssh/known_hosts`);
yield exec.exec(`chmod 755 $HOME/.ssh/known_hosts`);
yield exec.exec(`mkdir -v -p ${process.env['HOME']}/.ssh`);
yield exec.exec(`chmod 700 ${process.env['HOME']}/.ssh`);
yield exec.exec(`echo "${userArguments.knownHosts}" > ${process.env['HOME']}/.ssh/known_hosts`);
yield exec.exec(`chmod 755 ${process.env['HOME']}/.ssh/known_hosts`);
console.log("✅ Configured known_hosts");
}
catch (error) {

View File

@ -6,10 +6,10 @@ async function run() {
const userArguments = getUserArguments();
if ( '' !== userArguments.knownHosts ) {
try {
await exec.exec(`mkdir -v -p $HOME/.ssh`);
await exec.exec(`chmod 700 $HOME/.ssh`);
await exec.exec(`echo ${userArguments.knownHosts} > $HOME/.ssh/known_hosts`);
await exec.exec(`chmod 755 $HOME/.ssh/known_hosts`);
await exec.exec(`mkdir -v -p ${process.env['HOME']}/.ssh`);
await exec.exec(`chmod 700 ${process.env['HOME']}/.ssh`);
await exec.exec(`echo "${userArguments.knownHosts}" > ${process.env['HOME']}/.ssh/known_hosts`);
await exec.exec(`chmod 755 ${process.env['HOME']}/.ssh/known_hosts`);
console.log("✅ Configured known_hosts");
} catch( error ) {
console.error("⚠️ Error configuring known_hosts")