Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Commit a56f762

Browse files
docs: clarify quote handling in su commands
- Add details about properly escaping quotes when using su command - Include examples of both single-quote and escaped double-quote approaches Co-authored-by: Jay Hack <jay@codegen.com>
1 parent b3d071f commit a56f762

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎docs/sandboxes/setup-commands.mdx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Enter your desired setup commands in the provided text area, with one command pe
3636
- All setup commands run as the **root** user
3737
- Your repository is cloned to the **/workspace** directory
3838
- If you need to run commands as a non-root user, use `su <username> -c "command"` (e.g., `su linuxbrew -c "brew install <package>"`)
39+
- When using quotes inside the `su` command, make sure to escape them properly: `su linuxbrew -c 'brew install "package with spaces"'` or `su linuxbrew -c "brew install \"package with spaces\""`
3940
</Info>
4041

4142
For example, you might want to:
@@ -78,6 +79,12 @@ npm run build
7879
# Running commands as a non-root user (e.g., for Homebrew)
7980
su linuxbrew -c "brew install postgresql"
8081
su linuxbrew -c "brew services start postgresql"
82+
83+
# Handling quotes in commands (using single quotes around the command)
84+
su linuxbrew -c 'brew install "package with spaces"'
85+
86+
# Alternative: escaping double quotes inside the command
87+
su linuxbrew -c "brew install \"package with spaces\""
8188
```
8289

8390
### Working with Different Python Versions

0 commit comments

Comments
 (0)