mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 16:06:42 +02:00
24 lines
695 B
Diff
24 lines
695 B
Diff
Pass SHELL environment variable to subshell
|
|
|
|
diff --git a/cmd/asdf/main_test.go b/cmd/asdf/main_test.go
|
|
index 38c39c7..83d5c86 100644
|
|
--- a/cmd/asdf/main_test.go
|
|
+++ b/cmd/asdf/main_test.go
|
|
@@ -2,6 +2,7 @@ package main
|
|
|
|
import (
|
|
"fmt"
|
|
+ "os"
|
|
"os/exec"
|
|
"strings"
|
|
"testing"
|
|
@@ -126,7 +127,8 @@ func runBatsFile(t *testing.T, dir, filename string) {
|
|
// Add dir to asdf test variables
|
|
asdfTestHome := fmt.Sprintf("BASE_DIR=%s", dir)
|
|
asdfBinPath := fmt.Sprintf("ASDF_BIN=%s", dir)
|
|
- cmd.Env = []string{asdfBinPath, asdfTestHome}
|
|
+ shellEnv := fmt.Sprintf("SHELL=%s", os.Getenv("SHELL"))
|
|
+ cmd.Env = []string{asdfBinPath, asdfTestHome, shellEnv}
|
|
|
|
err := cmd.Run()
|
|
if err != nil {
|