close
Skip to content

chore(examples): add -S to env shebangs for portability#3210

Open
lucky-verma wants to merge 1 commit intoopenai:nextfrom
lucky-verma:chore/examples-shebang-portable
Open

chore(examples): add -S to env shebangs for portability#3210
lucky-verma wants to merge 1 commit intoopenai:nextfrom
lucky-verma:chore/examples-shebang-portable

Conversation

@lucky-verma
Copy link
Copy Markdown

four example shebangs are missing the -S flag:

examples/audio.py
examples/speech_to_text.py
examples/text_to_speech.py
examples/realtime/realtime.py

they currently use #!/usr/bin/env rye run python. CONTRIBUTING.md shows the canonical form as #!/usr/bin/env -S rye run python and other examples (responses/background_streaming.py for instance) already use that. without -S, BSD env on older macOS treats rye run python as a single program name and the script fails. linux env splits args by default since coreutils 8.30 so it works there either way, but the -S form is the portable one.

ran ruff check + format on all four, both clean. only the shebang line changed in each file.

Four examples use the rye shebang without the -S flag:
  examples/audio.py
  examples/speech_to_text.py
  examples/text_to_speech.py
  examples/realtime/realtime.py

CONTRIBUTING.md shows the canonical form as #!/usr/bin/env -S rye run python.
Without -S, BSD env (older macOS) treats 'rye run python' as a single
program name and fails. This brings these four files in line with the
documented canonical form and the other examples that already use -S
(e.g. responses/background_streaming.py).
@lucky-verma lucky-verma requested a review from a team as a code owner May 8, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant