Wrap script in main() to prevent line-by-line execution bug
When run via `bash <(curl ...)`, bash reads the script incrementally from a process substitution fd. If a `read < /dev/tty` call disrupts the fd state, bash can lose its place and the remaining script lines get fed to the interactive shell prompt as individual commands. Wrapping everything in main() forces bash to parse the entire script into memory before executing any of it — the standard fix for curl-piped scripts. Also changed README one-liner to download-then-execute pattern (curl -o /tmp/... && bash /tmp/...) as a belt-and-suspenders approach. https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
## Quick install
|
||||
|
||||
```bash
|
||||
bash <(curl -fsSL https://raw.githubusercontent.com/outis1one/openwhispr-easy-setup/main/setup-openwhispr.sh)
|
||||
curl -fsSL https://raw.githubusercontent.com/outis1one/openwhispr-easy-setup/main/setup-openwhispr.sh -o /tmp/setup-openwhispr.sh && bash /tmp/setup-openwhispr.sh
|
||||
```
|
||||
|
||||
Or clone and run:
|
||||
|
||||
Reference in New Issue
Block a user