Skip to content

Commit 9c71d62

Browse files
committed
Force EDITOR env var
1 parent 4f95788 commit 9c71d62

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/publish_int_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"os"
66
"regexp"
7+
"runtime"
78
"testing"
89
"time"
910

@@ -32,6 +33,14 @@ func (suite *PublishIntegrationTestSuite) TestPublish() {
3233
// For development convenience, should not be committed without commenting out..
3334
// os.Setenv(constants.APIHostEnvVarName, "pr13375.activestate.build")
3435

36+
// Set EDITOR environment variable for testing purposes
37+
if runtime.GOOS == "windows" {
38+
suite.Require().NoError(os.Setenv("EDITOR", "notepad.exe"))
39+
} else {
40+
suite.Require().NoError(os.Setenv("EDITOR", "nano"))
41+
}
42+
defer os.Unsetenv("EDITOR")
43+
3544
type input struct {
3645
args []string
3746
metafile *string

0 commit comments

Comments
 (0)