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 error message when user passes a single array argument #468

Merged
merged 1 commit into from Jun 4, 2021

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Jun 4, 2021

When the user passes a single array argument, the error message used to be The "file" argument must be of type string. Received an instance of Array. With #466, it is now much less clear:

TypeError: arg.replace is not a function
at escapeArg (/var/www/html/node_modules/execa/lib/command.js:18:17)

This PR fixes this.

@sindresorhus sindresorhus changed the title Improve error message when user passes a single array argument Fix error message when user passes a single array argument Jun 4, 2021
@sindresorhus sindresorhus merged commit 2b9c0e1 into main Jun 4, 2021
@sindresorhus sindresorhus deleted the fix/validate-array-arg branch June 4, 2021 16:31
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