-
-
Notifications
You must be signed in to change notification settings - Fork 197
Delete project directory if project creation doesn't succeed #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
projectDir = path.join(projectDir, projectName); | ||
this.$fs.createDirectory(projectDir).wait(); | ||
projectDir = path.join(projectDir, projectName); | ||
this.$fs.createDirectory(projectDir).wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If createDirectory() fails, then the catch block will try to deleteDir() it. Is this intended?
Also, I think the code which cannot throw, which is all the code up to this line, should be outside the try block.
|
||
this.$logger.out("Project successfully created."); | ||
} catch(ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to name this just e
or err
because it is not an Exception
but Error
.
You can extract |
👍 |
Delete project directory if project creation doesn't succeed
…-local Fix check for android local builds
No description provided.