docs: use pipe pattern for curl installer commands
Replace `sh -c "$(curl ...)"` with `curl ... | sh` across all documentation. The subshell pattern breaks when users embed the command inside other scripts (e.g. Dockerfiles using here-docs), because the outer shell eagerly expands `$(curl ...)` before writing the script to disk, mangling the installer contents. The pipe pattern avoids this problem and is friendlier to further scripting. For commands that pass arguments (--dry-run, --dev), `sh -s --` is used to forward them through stdin.
This commit is contained in:
@@ -208,7 +208,7 @@ If terminals, API keys, or config files are new to you, use the guided zero-back
|
||||
macOS / Linux:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh)"
|
||||
curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh | sh
|
||||
```
|
||||
|
||||
Windows PowerShell:
|
||||
@@ -222,7 +222,7 @@ The default command installs or upgrades `nanobot-ai` from PyPI, then starts `na
|
||||
To preview the plan without changing your environment, pass `--dry-run`; combine it with `--dev` when you want to preview the main-branch install.
|
||||
|
||||
```bash
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh)" -- --dry-run
|
||||
curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh | sh -s -- --dry-run
|
||||
```
|
||||
|
||||
```powershell
|
||||
@@ -232,7 +232,7 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts
|
||||
To install the current `main` branch instead, pass `--dev`:
|
||||
|
||||
```bash
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh)" -- --dev
|
||||
curl -fsSL https://raw.githubusercontent.com/HKUDS/nanobot/main/scripts/install.sh | sh -s -- --dev
|
||||
```
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user