Merge pull request #1662 from balena-io/1658-remove-old-files-during-standalone-install

Make windows installer remove old files before installation.
This commit is contained in:
srlowe 2020-03-12 18:59:51 +01:00 committed by GitHub
commit 7dc3977e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ index cd771cd..4a66939 100644
}
}
diff --git a/node_modules/@oclif/dev-cli/lib/commands/pack/win.js b/node_modules/@oclif/dev-cli/lib/commands/pack/win.js
index a9d4276..75c2f8b 100644
index a9d4276..4ac508f 100644
--- a/node_modules/@oclif/dev-cli/lib/commands/pack/win.js
+++ b/node_modules/@oclif/dev-cli/lib/commands/pack/win.js
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
@ -47,6 +47,20 @@ index a9d4276..75c2f8b 100644
};
exports.default = PackWin;
const scripts = {
@@ -89,6 +93,13 @@ VIAddVersionKey /LANG=\${LANG_ENGLISH} "ProductVersion" "\${VERSION}.0"
InstallDir "\$PROGRAMFILES${arch === 'x64' ? '64' : ''}\\${config.dirname}"
Section "${config.name} CLI \${VERSION}"
+ ; First remove any old client files.
+ ; (Remnants of old versions were causing CLI errors)
+ ; Initially tried running the Uninstall.exe, but was
+ ; unable to make script wait for completion (despite using _?)
+ DetailPrint "Removing files from previous version."
+ RMDir /r "$INSTDIR\\client"
+
SetOutPath $INSTDIR
File /r bin
File /r client
diff --git a/node_modules/@oclif/dev-cli/lib/tarballs/build.js b/node_modules/@oclif/dev-cli/lib/tarballs/build.js
index 3e613e0..dd23903 100644
--- a/node_modules/@oclif/dev-cli/lib/tarballs/build.js