-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Multiline shebang is not supported #2708
Comments
Two examples of how this could be used, both don't work at the moment: #!/usr/bin/env nix-shell
#!nix-shell -i dub -p dub ldc
import std.stdio;
void main()
{
writeln("Hello, world!");
}
#!/usr/bin/env nix-shell
#!nix-shell -i dub -p dub ldc
/+ dub.sdl:
name "hello_vibed"
dependency "vibe-d" version="~>0.9.0"
+/
import vibe.vibe;
void main()
{
listenHTTP("127.0.0.1:8080", (req, res) {
res.writeBody("Hello Vibe.d: " ~ req.path);
});
runApplication();
} The double-shebang is enforced by
|
@rikkimax : Is there a spec somewhere or is this a Nix-specific feature ? Never seen it used anywhere else. |
It is nix specific.
POSIX is single line only if I remember right.
…On Fri, Dec 29, 2023, 05:41 Mathias LANG ***@***.***> wrote:
@rikkimax <https://github.com/rikkimax> : Is there a spec somewhere or is
this a Nix-specific feature ? Never seen it used anywhere else.
—
Reply to this email directly, view it on GitHub
<#2708 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHSL42KXUGXGDKRAOAUR2TYLWONPAVCNFSM6AAAAAA6ME7A2WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGMZTEMZYG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Multiline shebangs are not currently supported. This could be useful in some software like Nix.
It should be an easy fix in both dmd and dub.
dub/source/dub/dub.d
Line 507 in 2ea8838
Related dmd issue: https://issues.dlang.org/show_bug.cgi?id=24194
The text was updated successfully, but these errors were encountered: