Skip to content
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

Fix #111. An empty target dir is ok #112

Closed
wants to merge 1 commit into from

Conversation

FrankFang
Copy link

No description provided.

Copy link
Member

@yyx990803 yyx990803 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to account for package.json name on line 50. Probably should use path.basename(root) instead.

console.error(`Error: target directory already exists.`)
} else {
throw e
const filesInRoot = await readdir(root).then(null, async (error) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't mix use of then when it's already using async await.

@yyx990803
Copy link
Member

Thanks for the PR, had to get a release out so didn't wait on the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants