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.

Support appending additional arguments

See original GitHub issue

Would it be possible to add the ability to accept additional arguments so I could do something like this:

"husky": {
  "hooks": {
    "post-checkout": "yarnhook --ignore-optional",
    "post-merge": "yarnhook --ignore-optional",
    "post-rewrite": "yarnhook --ignore-optional"
  }
}

I’d really like to prevent yarnhook from installing optional dependencies.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
zkochancommented, Jan 11, 2021

I don’t think this was a good idea. If someone wants to influence how the package manager is behaving itself, they can just create a config file for that package manager with settings. So if I want to skip optional dependencies, I would create a .npmrc with this content:

optional=false

Now because the CLI flags have the biggest priority, there is no way to include optional dependencies. I need optional dependencies to be installed. So now I have to always rerun pnpm install after switching branches. So yarnhook loses its benefits in my case.

0reactions
frontsideaircommented, Jun 2, 2022

I cut a new release, it’s a major one due to the reasons mentioned in the release page. I hope this solves existing problems and please let me know if it breaks anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to use multiple arguments for .append, anyway how?
You are sending append() multiple arguments not a string. Format the argument as a string as such. Also, random.choice() is a better ...
Read more >
Can .append(#1,#2) take two or more arguments - Codecademy
.append can does take two arguments, but one is an index and the other is what you want in that index. Remember, computers...
Read more >
Append argument to arguments list - Unix Stack Exchange
Put the arguments into an array and then append to the array. args=("$@") args+=(foo) args+=(bar) baz "${args[@]}".
Read more >
Python's .append(): Add Items to Your Lists in Place
Python lists reserve extra space for new items at the end of the list. A call to .append() will place new items in...
Read more >
Function.prototype.apply() - JavaScript - MDN Web Docs
The apply() method calls the specified function with a given this value, and arguments provided as an array (or an array-like object).
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