We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d312f14 commit 58e833dCopy full SHA for 58e833d
lib/common/file-system.ts
@@ -200,7 +200,16 @@ export class FileSystem implements IFileSystem {
200
}
201
202
public createDirectory(path: string): void {
203
- mkdirp.sync(path);
+ try {
204
+ mkdirp.sync(path);
205
+ } catch (error) {
206
+ const $errors = this.$injector.resolve("errors");
207
+ let errorMessage = `Unable to create directory ${path}. \nError is: ${error}.`;
208
+ if (error.code === "EACCES") {
209
+ errorMessage += "\n\nYou may need to call the command with 'sudo'.";
210
+ }
211
+ $errors.fail(errorMessage);
212
213
214
215
public readDirectory(path: string): string[] {
0 commit comments