baton-host 0.1.8 → 0.1.9

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/bin/baton-host.js CHANGED
@@ -564,6 +564,7 @@ function cleanupInstallArtifacts() {
564
564
  removePathIfExists(WRAPPER_PATH);
565
565
  removePathIfExists(INSTALL_META_PATH);
566
566
  removePathIfExists(INSTALL_LOG_DIR);
567
+ removePathIfExists(BRIDGE_INFO_PATH);
567
568
 
568
569
  try {
569
570
  const remaining = fs.existsSync(INSTALL_ROOT) ? fs.readdirSync(INSTALL_ROOT) : [];
@@ -673,6 +674,9 @@ async function handleServiceInstall(options = {}) {
673
674
  writeWrapperScript();
674
675
  writeInstallMeta(version);
675
676
 
677
+ // 清除旧的 bridge-info,以便 runBridgePrintCommand 可以等待新的文件生成
678
+ removePathIfExists(BRIDGE_INFO_PATH);
679
+
676
680
  const serviceFile = process.platform === "linux" ? installLinuxService() : installMacService();
677
681
  const action = preserveConfig
678
682
  ? (previousVersion && previousVersion !== version ? "升级并重启" : "覆盖并重启")
@@ -687,6 +691,7 @@ async function handleServiceInstall(options = {}) {
687
691
 
688
692
  async function handleServiceRestart() {
689
693
  ensureSupportedServicePlatform();
694
+ removePathIfExists(BRIDGE_INFO_PATH);
690
695
  if (process.platform === "linux") {
691
696
  restartLinuxService();
692
697
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baton-host",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Baton Bridge Host CLI(二进制分发入口)",
5
5
  "license": "MIT",
6
6
  "bin": {