Running a script with optional arguments and --no-bail
See original GitHub issueI have a lerna project. In some of the subprojects I have the following script defined in package json "lint": "eslint ."
.
From the parent directory I can run yarn lerna run lint
, this runs lerna which in turn runs lint in every package. So far so good.
I can run as well yarn lerna lint -- -- --fix
which effectively runs lerna run lint -- --fix
which in turns means eslint . --fix
, which is what I want.
However, I’m not able to execute the same command with no-bail. If I do
yarn lerna run --no-bail lint -- -- --fix
, lerna complains of the following: ERR! lerna Not enough non-option arguments: got 0, need at least 1
Yarn version 1.12.3
Lerna version 3.13.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to write a bash script that takes optional input arguments?
I want to say that the this subject is not about the optional argument but a positional argument with default value. This terminology...
Read more >Named and Optional Arguments - C# Programming Guide
Optional arguments enable you to omit arguments for some parameters. Both techniques can be used with methods, indexers, constructors, ...
Read more >How To Pass and Parse Linux Bash Script Arguments and ...
Just the command for running the script normally by adding the value of the parameters directly to the script. Every parameter is a...
Read more >How to input optional arguments in python command line
However I have another case where only file1 may be present so file1 is mandatory for this script to run however file2 is...
Read more >Adding arguments and options to your Bash scripts - Red Hat
Create a new Bash shell script, ~/bin/hello.sh , and make it executable. Add the following content, keeping it basic to start: #!/bin/bash echo ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe just run it from the root? I really don’t understand everyone’s fascination with running lint/test scripts from every single leaf package directly.
yarn lerna lint
isn’t a command that lerna understands.Hi Folks 👋
You will have seen in our message above that we at Nrwl are working really hard to bring the lerna repo up to date with what matters most to its community in June 2022.
As previously stated in that message, because we have not heard from the original author of this issue within the last 14 days, we are now automatically closing it.
If any users, including the original author, are still impacted by this issue then we still want to hear from you!
All we ask is that you first update to the latest lerna (
5.1.4
at the time of writing) to make sure it is still reproducible, and then fill out one of our new issue templates, providing all the requested details which apply to your situation:https://github.com/lerna/lerna/issues/new/choose
Many thanks again! 🙏
P.S. Over and above getting to grips with the repo, we have also been hard at work launching a new website, resolving all vulnerabilities, merging exciting new features and reigniting community PR contributions! 🚀
You can read our recent blog post to learn more about what we’ve been up to: https://blog.nrwl.io/lerna-5-1-new-website-new-guides-new-lerna-example-repo-distributed-caching-support-and-speed-64d66410bec7