From 10cbf514a2493cbe3d9c875d30ddfed2f37c79e7 Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Thu, 12 Mar 2020 16:55:52 +0100 Subject: [PATCH] Make windows installer remove old files before installation. Change-type: patch Resolves: #1658 --- patches/@oclif+dev-cli+1.22.0.patch | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/patches/@oclif+dev-cli+1.22.0.patch b/patches/@oclif+dev-cli+1.22.0.patch index 47715957..4adbeaf2 100644 --- a/patches/@oclif+dev-cli+1.22.0.patch +++ b/patches/@oclif+dev-cli+1.22.0.patch @@ -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