From f92a4997cedd28f9bb5ba87e6418f1a347cf1256 Mon Sep 17 00:00:00 2001 From: Tristan Cartledge Date: Wed, 15 Nov 2023 14:05:04 +0000 Subject: [PATCH] fix: setting environment variables --- internal/cli/speakeasy.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/cli/speakeasy.go b/internal/cli/speakeasy.go index bbb19c8a..fa737d00 100644 --- a/internal/cli/speakeasy.go +++ b/internal/cli/speakeasy.go @@ -69,9 +69,8 @@ func runSpeakeasyCommand(args ...string) (string, error) { cmd := exec.Command(cmdPath, args...) cmd.Dir = filepath.Join(environment.GetWorkspace(), "repo", environment.GetWorkingDirectory()) - cmd.Env = []string{ - "SPEAKEASY_RUN_LOCATION=action", - } + cmd.Env = os.Environ() + cmd.Env = append(cmd.Env, "SPEAKEASY_RUN_LOCATION=action") output, err := cmd.CombinedOutput() if err != nil { return string(output), fmt.Errorf("error running speakeasy command: speakeasy %s - %w\n %s", strings.Join(args, " "), err, string(output))