Skip to content

Commit

Permalink
Enable dotglob by default
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Oct 28, 2023
1 parent 87b3afd commit 7c7d2c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "domcloud-bridge",
"version": "0.31.0",
"version": "0.31.1",
"description": "Deployment runner for DOM Cloud",
"main": "app.js",
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions src/executor/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
}
}
if (config.source || config.commands) {
await sshExec(`shopt -s dotglob`, false);
await sshExec(`export DOMAIN='${subdomain}'`, false);
await sshExec(`mkdir -p ${subdomaindata['Home directory']}/public_html && cd "$_"`);
}
Expand Down Expand Up @@ -737,7 +738,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
}
}
}
let executedCMD = [`shopt -s dotglob`, `rm -rf *`];
let executedCMD = [`rm -rf *`];
let executedCMDNote = '';
if (source.url === 'clear') {
// we just delete them all
Expand Down Expand Up @@ -770,7 +771,7 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
}
if (url.pathname.endsWith('.tar.gz')) {
executedCMD.push(`wget -O _.tar.gz ` + escapeShell(url.toString()));
executedCMD.push(`tar -xvzf _.tar.gz ; rm _.tar.gz ; chmod -R 0750 *`);
executedCMD.push(`tar -xzf _.tar.gz ; rm _.tar.gz ; chmod -R 0750 *`);
} else {
executedCMD.push(`wget -O _.zip ` + escapeShell(url.toString()));
executedCMD.push(`unzip -q -o _.zip ; rm _.zip ; chmod -R 0750 *`);
Expand All @@ -781,7 +782,6 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
}
executedCMDNote = 'Downloading files';
}
executedCMD.push(`shopt -u dotglob`);
if (firewallOn) {
await iptablesExec.setDelUser(domaindata['Username']);
}
Expand Down

0 comments on commit 7c7d2c3

Please sign in to comment.