@noahyu/cd-cli 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.js +3 -2
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -145,13 +145,14 @@ async function deploy(config, version) {
|
|
|
145
145
|
if (config.afterDeploy) {
|
|
146
146
|
for (const cmd of config.afterDeploy) {
|
|
147
147
|
spinner.start(`执行部署后命令: ${cmd}`);
|
|
148
|
-
const
|
|
148
|
+
const inner = [
|
|
149
|
+
'export PS1="x"',
|
|
149
150
|
'[ -f /etc/profile ] && . /etc/profile 2>/dev/null || true',
|
|
150
151
|
'[ -f ~/.bash_profile ] && . ~/.bash_profile 2>/dev/null || true',
|
|
151
152
|
'[ -f ~/.bashrc ] && . ~/.bashrc 2>/dev/null || true',
|
|
152
153
|
cmd,
|
|
153
154
|
].join('; ');
|
|
154
|
-
const result = await ssh.execCommand(`bash -c ${JSON.stringify(
|
|
155
|
+
const result = await ssh.execCommand(`bash -l -c ${JSON.stringify(inner)}`, {
|
|
155
156
|
cwd: config.server.deployPath,
|
|
156
157
|
});
|
|
157
158
|
if (result.stdout) {
|