Use latest version of fs-extra due to stack overflow bugs in earlier versions

This commit is contained in:
Miro Spönemann
2020-01-15 17:10:59 +01:00
parent a1ab42d282
commit 2577451c15
3 changed files with 9 additions and 49 deletions

View File

@@ -21,7 +21,7 @@ export class SketchesServiceImpl implements SketchesService {
const { sketchDirUri } = (await this.configService.getConfiguration());
fsPath = FileUri.fsPath(sketchDirUri);
if (!fs.existsSync(fsPath)) {
fs.mkdirpSync(fsPath);
await fs.mkdirp(fsPath);
}
} else {
fsPath = FileUri.fsPath(uri);
@@ -96,8 +96,8 @@ export class SketchesServiceImpl implements SketchesService {
const sketchDir = path.join(parent, sketchName)
const sketchFile = path.join(sketchDir, `${sketchName}.ino`);
fs.mkdirpSync(sketchDir);
fs.writeFileSync(sketchFile, `
await fs.mkdirp(sketchDir);
await fs.writeFile(sketchFile, `
void setup() {
// put your setup code here, to run once:
@@ -140,4 +140,4 @@ void loop() {
}
return false;
}
}
}