question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running a script with optional arguments and --no-bail

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
evocateurcommented, Apr 17, 2019

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.

0reactions
github-actions[bot]commented, Jun 17, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found