Closed Paolo-Oliverio closed 1 year ago
Heyho! The ensureDirSync change is cool but let's make setDebugDir print an error and throw when the dir does not exist.
setDebugDir(debugDir: string) {
this.debugDir = path.resolve(this.basedir, debugDir);
if(!fs.existsSync(this.debugDir)) {
throw new Error(`Debug directory ${this.debugDir} does not exist`);
}
}
this way?
Changed manual recursion to mkdirSync recursivity and added try catch and logging.
Added ensureDirSync to setDebugDir that failed silently in case of missing directory.