File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 77 "runtime"
88 "testing"
99
10- "github.com/ActiveState/cli/internal/config"
1110 "github.com/ActiveState/cli/internal/fileutils"
1211 "github.com/ActiveState/cli/internal/locale"
1312 "github.com/ActiveState/cli/internal/osutils"
@@ -124,12 +123,14 @@ func (suite *UseIntegrationTestSuite) TestReset() {
124123 python3Exe := filepath .Join (ts .Dirs .DefaultBin , "python3" + osutils .ExeExtension )
125124 suite .True (fileutils .TargetExists (python3Exe ), python3Exe + " not found" )
126125
127- cfg , err := config . New ()
128- suite . NoError ( err )
129- rcfile , err := subshell . New ( cfg ). RcFile ()
130- if runtime . GOOS != "windows" && fileutils . FileExists ( rcfile ) {
126+ var rcfile string
127+ ts . WithEnv ( func () {
128+ var err error
129+ rcfile , err = subshell . New ( ts . Config ()). RcFile ()
131130 suite .NoError (err )
132- suite .Contains (string (fileutils .ReadFileUnsafe (rcfile )), ts .Dirs .DefaultBin , "PATH does not have your project in it" )
131+ })
132+ if runtime .GOOS != "windows" && fileutils .FileExists (rcfile ) {
133+ suite .Contains (string (fileutils .ReadFileUnsafe (rcfile )), ts .Dirs .DefaultBin , ts .DebugMessage ("PATH does not have your project in it" ))
133134 }
134135
135136 cp = ts .Spawn ("use" , "reset" )
You can’t perform that action at this time.
0 commit comments