From c3281da3445fa70aa7115865daf7d8f21f967b08 Mon Sep 17 00:00:00 2001 From: Kyle Micallef Bonnici Date: Thu, 11 Jul 2024 16:04:07 +0200 Subject: [PATCH] Fix: clean up any residual sandbox folder on install (#932) --- Changelog.md | 6 ++++++ nrfutil/sandbox.ts | 7 +++++++ package.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 9b7eef781..e723537c3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,12 @@ This project does _not_ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it every new version is a new major version. +## 181.0.0 - 2024-07-11 + +### Changed + +- nrfutil sandbox deletes any residual sandbox folder before install. + ## 180.0.0 - 2024-07-01 ### Changed diff --git a/nrfutil/sandbox.ts b/nrfutil/sandbox.ts index 24b2af412..b7b25a029 100644 --- a/nrfutil/sandbox.ts +++ b/nrfutil/sandbox.ts @@ -194,6 +194,13 @@ export class NrfutilSandbox { onProgress?: (progress: Progress, task?: Task) => void ) => { try { + // Clean up any residual sandbox from before if any + if (this.env.NRFUTIL_HOME && fs.existsSync(this.env.NRFUTIL_HOME)) { + fs.rmSync(this.env.NRFUTIL_HOME, { + recursive: true, + force: true, + }); + } await this.spawnNrfutil( 'install', [`${this.module}=${this.version}`, '--force'], diff --git a/package.json b/package.json index 23b36cd47..f36da551d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nordicsemiconductor/pc-nrfconnect-shared", - "version": "180.0.0", + "version": "181.0.0", "description": "Shared commodities for developing pc-nrfconnect-* packages", "repository": { "type": "git",