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

Remove leading spaces of yarn run's answer #5581

Merged
merged 2 commits into from
Apr 4, 2018
Merged

Remove leading spaces of yarn run's answer #5581

merged 2 commits into from
Apr 4, 2018

Conversation

pd4d10
Copy link
Contributor

@pd4d10 pd4d10 commented Mar 27, 2018

Summary

If user's answer contains leading spaces, the command will fail. Like:

> yarn run
...
question Which command would you like to run?:  start
error An unexpected error occurred: "Command \"\" not found.".

This PR add a trim operation to remove leading spaces

Test plan

Copy link

@waleedahmed3045 waleedahmed3045 left a comment

Choose a reason for hiding this comment

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

@pd4d10 its a good idea but i think its better to have strict check on the input of the user. I would prefer if error is more descriptive and specifies the full entry not just empty spaces :)

@arcanis
Copy link
Member

arcanis commented Apr 4, 2018

I think it's fine - this syntax is only used from the command line and not by script, so from a DevX perspective it's better if we can be more tolerant on such mistakes.

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.

3 participants