Set absolute `bash` path

and slightly revert assertion in docs test to ensure flag ordering
main
Dan Buch 2 years ago
parent 5edc1b95e8
commit 8f47e6dc97
Signed by: meatballhat
GPG Key ID: A12F782281063434

@ -363,7 +363,7 @@ For example this:
<!-- {
"args": ["&#45;&#45;help"],
"output": ".*Language for the greeting.*"
"output": ".*Load configuration from FILE\n.*\n.*Language for the greeting.*"
} -->
``` go
package main

@ -182,6 +182,13 @@ func testCleanup(packages []string) error {
func GfmrunActionFunc(cCtx *cli.Context) error {
top := cCtx.Path("top")
bash, err := exec.LookPath("bash")
if err != nil {
return err
}
os.Setenv("SHELL", bash)
tmpDir, err := os.MkdirTemp("", "urfave-cli*")
if err != nil {
return err
@ -203,7 +210,6 @@ func GfmrunActionFunc(cCtx *cli.Context) error {
}
os.Setenv("TMPDIR", tmpDir)
os.Setenv("SHELL", "bash")
if err := os.Chdir(wd); err != nil {
return err

Loading…
Cancel
Save