@noahyu/cd-cli 1.2.1 → 1.2.2

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
@@ -110,7 +110,7 @@ async function deploy(config, version) {
110
110
  if (linkResult.code !== 0) {
111
111
  throw new Error(`创建临时软链接失败: ${linkResult.stderr}`);
112
112
  }
113
- const moveResult = await ssh.execCommand(`mv ${tempLinkPath} ${currentLinkPath}`);
113
+ const moveResult = await ssh.execCommand(`mv -T ${tempLinkPath} ${currentLinkPath}`);
114
114
  if (moveResult.code !== 0) {
115
115
  await ssh.execCommand(`rm -f ${tempLinkPath}`);
116
116
  throw new Error(`切换软链接失败: ${moveResult.stderr}`);
@@ -405,7 +405,7 @@ async function performRollback(config, targetVersion, buildDirName) {
405
405
  if (linkResult.code !== 0) {
406
406
  throw new Error(`创建临时软链接失败: ${linkResult.stderr}`);
407
407
  }
408
- const moveResult = await ssh.execCommand(`mv ${tempLinkPath} ${currentLinkPath}`);
408
+ const moveResult = await ssh.execCommand(`mv -T ${tempLinkPath} ${currentLinkPath}`);
409
409
  if (moveResult.code !== 0) {
410
410
  await ssh.execCommand(`rm -f ${tempLinkPath}`);
411
411
  throw new Error(`切换软链接失败: ${moveResult.stderr}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noahyu/cd-cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Global CLI tool for simple project deployment with version management",
5
5
  "type": "module",
6
6
  "main": "./dist/bin/cli.js",