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(core): workspace-generator errors should be propagated to nx #12955

Merged

Conversation

meeroslav
Copy link
Contributor

Current Behavior

The workspace-generator uses yargs to handle help and argument parsing which results in the following errors:

  • positional arguments are causing the command to break even if the argument as passed as optional one

    nx workspace-generator some-name # this succeeds
    nx workspace-generator --name=some-name # this fails
  • error reported in the default one from yargs and it's not very helpful

    Not enough non-option arguments: got 0, need at least 1
    

Expected Behavior

  • Mandatory fields are marked as [required]
  • Options can be passed as both flags and positionals (if defined as such)
  • Useful errors should be reported
    Screenshot 2022-11-03 at 00 11 47

Related Issue(s)

Fixes #12677

@meeroslav meeroslav added the scope: core core nx functionality label Nov 2, 2022
@meeroslav meeroslav self-assigned this Nov 2, 2022
@vercel
Copy link

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ❌ Failed (Inspect) Nov 2, 2022 at 11:17PM (UTC)

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: core core nx functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local workspace-generator does not work after update to nx@15.0.0
2 participants