Skip to content

Commit

Permalink
Fix platformio clearing files
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgelenas committed Feb 1, 2022
1 parent 435aeed commit 8af5a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/src/services/Firmware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export default class FirmwareService {
const dotPlatformio = path.join(os.homedir(), '.platformio');
const statResult = await fs.promises.lstat(dotPlatformio);
if (!statResult.isDirectory()) {
throw new Error(`.platformio is not a directory: ${dotPlatformio}`);
return Promise.resolve();
}
return new Promise((resolve, reject) => {
rimraf(dotPlatformio, (err) => {
Expand Down Expand Up @@ -618,7 +618,7 @@ export default class FirmwareService {
err: e,
}
);
return this.clearPlatformioCoreDir();
return this.removePlatformioDir();
}
return Promise.resolve();
}
Expand Down

0 comments on commit 8af5a0c

Please sign in to comment.