Skip to content

Commit

Permalink
Feat: cleanup on sandbox on fail (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebonnici authored Jul 1, 2024
1 parent 9e5047d commit 807dc4e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

## 180.0.0 - 2024-07-01

### Changed

- nrfutil sandbox folder is deleted if installation fails.

## 179.0.0 - 2024-06-20

### Changed
Expand Down
7 changes: 7 additions & 0 deletions nrfutil/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ export class NrfutilSandbox {
`Successfully installed nrfutil-${this.module} version ${this.version}`
);
} catch (error) {
if (this.env.NRFUTIL_HOME && fs.existsSync(this.env.NRFUTIL_HOME)) {
fs.rmSync(this.env.NRFUTIL_HOME, {
recursive: true,
force: true,
});
}

getNrfutilLogger()?.error(
`Error while installing nrfutil-${this.module} version: ${
this.version
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
"version": "179.0.0",
"version": "180.0.0",
"description": "Shared commodities for developing pc-nrfconnect-* packages",
"repository": {
"type": "git",
Expand Down

0 comments on commit 807dc4e

Please sign in to comment.