Skip to content

Fix shebang recommendation in file-based apps docs#53566

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-file-based-apps-shebang
Draft

Fix shebang recommendation in file-based apps docs#53566
Copilot wants to merge 2 commits intomainfrom
copilot/fix-file-based-apps-shebang

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

#!/usr/bin/env dotnet causes dotnet to silently consume CLI arguments that match its own parameters (e.g., --help) instead of forwarding them to the app.

Changes

  • docs/core/sdk/file-based-apps.md — Shell execution section
    • Updated recommended shebang from #!/usr/bin/env dotnet to #!/usr/bin/env -S dotnet --
      • -S: tells env to split the remaining text so -- is a distinct argument
      • --: tells dotnet to forward all subsequent arguments to the app
    • Added explanatory paragraph describing why the new form is needed
    • Added note recommending #!/usr/bin/env dotnet as a fallback for systems where -S isn't supported, with a caveat about argument forwarding
#!/usr/bin/env -S dotnet --
#:package Spectre.Console

using Spectre.Console;

AnsiConsole.MarkupLine("[green]Hello, World![/]");

Copilot AI self-assigned this May 5, 2026
Copilot AI review requested due to automatic review settings May 5, 2026 19:16
Copilot AI review requested due to automatic review settings May 5, 2026 19:16
Copilot AI linked an issue May 5, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot May 5, 2026 19:20
Copilot AI changed the title [WIP] Fix shebang recommendation in file based apps document Fix shebang recommendation in file-based apps docs May 5, 2026
Copilot AI requested a review from adegeo May 5, 2026 19:20
Copilot finished work on behalf of adegeo May 5, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File based apps document has incorrect shebang recommendation

3 participants