-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Sync docs: add environment variables and working directory support to command exec #26653
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
base: production
Are you sure you want to change the base?
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
13ae41f to
084eb8a
Compare
|
Updated documentation to reflect the new per-command ChangesCommands API (
|
|
✅ Documentation sync complete! Files Updated1.
|
|
Added comprehensive documentation for all |
4d2e471 to
1f61420
Compare
Document new env and cwd parameters for exec(), execStream(), and startProcess() methods. These options allow temporary per-command overrides of session/sandbox-level settings without persisting changes. - Updated commands.mdx with env and cwd parameters for exec() and execStream() - Added example showing usage of env and cwd options - Updated startProcess() documentation with complete options list - Updated environment-variables.mdx to include execStream() example Related PR: cloudflare/sandbox-sdk#204 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
1f61420 to
6b9482e
Compare
|
Updated documentation to include:
The documentation now accurately reflects the API changes from cloudflare/sandbox-sdk#204. |
Remove timeout from execStream() and timeout/encoding/autoCleanup from startProcess() to match actual SDK implementation. These parameters were accepted by the SDK but not used in the execution flow, causing potential confusion for users.
Summary
Documents new
envandcwdparameters added to command execution methods in the Cloudflare Sandbox SDK.Changes
API Documentation (
sandbox/api/commands.mdx)envandcwdparameters toexec()method documentationenvandcwdparameters toexecStream()method documentationExecute Commands Guide (
sandbox/guides/execute-commands.mdx)cwdoption as best practiceContext
These parameters allow customizing command execution on a per-command basis:
env: Environment variables merged with session environment (per-command only)cwd: Working directory that overrides session working directory (per-command only)This provides flexibility for different command contexts without affecting the broader session state.
Source
🤖 Synced from cloudflare/sandbox-sdk PR #204
Original PR Title: add environment variables and working directory support to command exec