npx in shebang comment #286
Unanswered
Gpx
asked this question in
Help needed
Replies: 1 comment 1 reply
-
Yes, it’s possible. But unfortunately not all systems support arguments in shbang. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started adding this shebang comment at the beginning of my scripts:
#!/usr/bin/env npx --yes zx
It ensures that anyone with
npx
installed can run them without having to installzx
.I don't see any drawbacks, but I didn't see it documented anywhere, and I was wondering if anyone knows of any issue with this approach.
Beta Was this translation helpful? Give feedback.
All reactions