-
Notifications
You must be signed in to change notification settings - Fork 500
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
Stabilize [script(…)]
attribute
#2260
Comments
Is it possible to add ext name support for
And following code is clean.
If you use JavaScript/Types, lots of extension names: js, cjs, mjs, ts, mts.
|
I think that would probably be confusing, and using an additional attribute for the extension isn't much of a burden. But note that an extension is only required if the interpreter requires one. Most don't, in fact the only interpreters I know if that will fail without the correct extension is |
Also, one more reason for not stabilizing the |
I wonder if there's a way to conditionally includes settings or variables to recipt like the SH := "sh"
[cfg_attr(unix, ```
set shell := ["bash", "-c"] // setting
SH := bash // variable
```)]
[cfg_attr(windows, ```
set shell := ["cmd", "/c"]
SH := cmd
```)]
[cfg_attr(cygwin, ```
set shell := ["bash", "-c"] // overwrite windows
SH := cygwin
CYGWIN := 1
```)]
[cfg_attr(true, ```
set unstable
UNSTABLE := 1
```)]
foo:
echo {{SH}} // print "cygwin" or "bash" or "cmd"
echo {{CYGWIN}} // print "1" or ""
echo {{UNSTABLE}} // print "1"
bar:
echo {{SH}} // print "sh"
echo {{CYGWIN}} // print ""
echo {{UNSTABLE}} // print "" |
@g9wp This seems unrelated to the |
This is a more general solution, |
A
[script(…)]
attribute was added in #2259. See #1479 for discussion.The attribute is currently unstable.
Before stabilization:
script
the right name?script-interpreter
setting and allow an empty[script]
attribute.The text was updated successfully, but these errors were encountered: