Skip to content

Fix shebang recommendation in file-based apps docs#53566

Merged
adegeo merged 4 commits into
mainfrom
copilot/fix-file-based-apps-shebang
May 11, 2026
Merged

Fix shebang recommendation in file-based apps docs#53566
adegeo merged 4 commits into
mainfrom
copilot/fix-file-based-apps-shebang

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

  • Update docs/core/sdk/file-based-apps.md Shell Execution section:
    • Change shebang from #!/usr/bin/env dotnet to #!/usr/bin/env -S dotnet --
    • Add explanation of -S flag and -- separator, leading with reason/purpose
    • Add note that #!/usr/bin/env dotnet can be used if -S isn't supported
  • Update docs/csharp/fundamentals/tutorials/file-based-programs.md:
    • Revise -S description to accurately say it passes dotnet and -- as separate arguments, while keeping focus on the practical effect

Internal previews

📄 File 🔗 Preview link
docs/core/sdk/file-based-apps.md docs/core/sdk/file-based-apps
docs/csharp/fundamentals/tutorials/file-based-programs.md docs/csharp/fundamentals/tutorials/file-based-programs

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
Copilot AI review requested due to automatic review settings May 11, 2026 17:22
@adegeo adegeo marked this pull request as ready for review May 11, 2026 17:23
@adegeo adegeo requested review from a team and BillWagner as code owners May 11, 2026 17:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates file-based app documentation and snippets to recommend a shebang that reliably forwards command-line arguments to the app (instead of letting dotnet consume arguments like --help).

Changes:

  • Updated shebang examples to #!/usr/bin/env -S dotnet -- in the C# tutorial, the SDK docs, and a referenced snippet.
  • Added explanation in the SDK docs for why -S and -- are needed for correct argument forwarding.
  • Added a fallback note for systems that don’t support env -S.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/csharp/fundamentals/tutorials/snippets/file-based-programs/AsciiArt.cs Updates the executable shebang in the tutorial snippet to use env -S and -- for correct arg forwarding.
docs/csharp/fundamentals/tutorials/file-based-programs.md Updates the tutorial’s shebang guidance and adds a tip about fallbacks.
docs/core/sdk/file-based-apps.md Updates the shebang recommendation and documents the --/-S rationale plus a fallback note.

Comment thread docs/csharp/fundamentals/tutorials/file-based-programs.md Outdated
Comment thread docs/csharp/fundamentals/tutorials/file-based-programs.md
Copilot finished work on behalf of adegeo May 11, 2026 19:21
@adegeo adegeo merged commit bc3f900 into main May 11, 2026
11 checks passed
@adegeo adegeo deleted the copilot/fix-file-based-apps-shebang branch May 11, 2026 22:17
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

4 participants