File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// What this primarily offers over directly writing e.g. `exec.Command("bash")`
33// is:
44//
5- // - By default, all fragments are executed in "bash strict mode": http://redsymbol.net/articles/unofficial-bash-strict-mode/
6- // - The code encourages adding a "name" for in-memory scripts, similar to e.g.
7- // Ansible tasks as well as many CI systems like Github actions
8- // - The code to execute is piped to stdin instead of passed via `-c` which
9- // avoids argument length limits and makes the output of e.g. `ps` readable.
10- // - Scripts are assumed synchronous, and stdin/stdout/stderr are passed directly
11- // instead of piped.
12- // - We use prctl(PR_SET_PDEATHSIG) (assuming Linux) to lifecycle bind the script to the caller
13- //
5+ // - By default, all fragments are executed in "bash strict mode": http://redsymbol.net/articles/unofficial-bash-strict-mode/
6+ // - The code encourages adding a "name" for in-memory scripts, similar to e.g.
7+ // Ansible tasks as well as many CI systems like Github actions
8+ // - The code to execute is piped to stdin instead of passed via `-c` which
9+ // avoids argument length limits and makes the output of e.g. `ps` readable.
10+ // - Scripts are assumed synchronous, and stdin/stdout/stderr are passed directly
11+ // instead of piped.
12+ // - We use prctl(PR_SET_PDEATHSIG) (assuming Linux) to lifecycle bind the script to the caller
1413package bashexec
1514
1615import (
You can’t perform that action at this time.
0 commit comments