mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-25 16:31:03 +00:00
0c7fef3b43
Change-type: patch
34 lines
1.7 KiB
Diff
34 lines
1.7 KiB
Diff
diff --git a/node_modules/oclif/lib/commands/pack/win.js b/node_modules/oclif/lib/commands/pack/win.js
|
|
index bfe9205..482519e 100644
|
|
--- a/node_modules/oclif/lib/commands/pack/win.js
|
|
+++ b/node_modules/oclif/lib/commands/pack/win.js
|
|
@@ -86,6 +86,12 @@ InstallDir "\$PROGRAMFILES${arch === 'x64' ? '64' : ''}\\${config.dirname}"
|
|
${customization}
|
|
|
|
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/lib/tarballs/build.js b/node_modules/oclif/lib/tarballs/build.js
|
|
index f0c8d95..a72400e 100644
|
|
--- a/node_modules/oclif/lib/tarballs/build.js
|
|
+++ b/node_modules/oclif/lib/tarballs/build.js
|
|
@@ -218,6 +218,11 @@ const extractCLI = async (tarball, c) => {
|
|
(0, promises_1.rm)(path.join(workspace, path.basename(tarball)), { recursive: true }),
|
|
(0, fs_extra_1.remove)(path.join(workspace, 'bin', 'run.cmd')),
|
|
]);
|
|
+ // The oclif installers are a production installation, while the source
|
|
+ // `bin` folder may contain a `.fast-boot.json` file of a dev installation.
|
|
+ // This has previously led to issues preventing the CLI from starting, so
|
|
+ // delete `.fast-boot.json` (if any) from the destination folder.
|
|
+ await (0, fs_extra_1.remove)(path.join(workspace, 'bin', '.fast-boot.json'));
|
|
};
|
|
const buildTarget = async (target, c, options) => {
|
|
if (target.platform === 'win32' && target.arch === 'arm64' && (0, semver_1.lt)(c.nodeVersion, '20.0.0')) {
|