Skip to content

Commit 9206f11

Browse files
committed
refactor: add recursive & force on removing out
1 parent 7086a7d commit 9206f11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/builders/ProjectBuilder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class ProjectBuilder {
342342
const args = this.getArgs('clean', opts);
343343
return execa(wrapper, args, { stdio: 'inherit', cwd: path.resolve(this.root) })
344344
.then(() => {
345-
fs.rmSync(path.join(this.root, 'out'));
345+
fs.rmSync(path.join(this.root, 'out'), { recursive: true, force: true });
346346

347347
['debug', 'release'].map(config => path.join(this.root, `${config}${SIGNING_PROPERTIES}`))
348348
.forEach(file => {

spec/unit/builders/ProjectBuilder.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ describe('ProjectBuilder', () => {
250250

251251
it('should remove "out" folder', () => {
252252
return builder.clean({}).then(() => {
253-
expect(fs.rmSync).toHaveBeenCalledWith(path.join(rootDir, 'out'));
253+
expect(fs.rmSync).toHaveBeenCalledWith(path.join(rootDir, 'out'), { recursive: true, force: true });
254254
});
255255
});
256256

0 commit comments

Comments
 (0)