@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 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 wrappedCmd = [
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(wrappedCmd)}`, {
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noahyu/cd-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Global CLI tool for simple project deployment with version management",
5
5
  "type": "module",
6
6
  "main": "./dist/bin/cli.js",