File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package agentscripts_test
3
3
import (
4
4
"context"
5
5
"path/filepath"
6
+ "runtime"
6
7
"testing"
7
8
"time"
8
9
@@ -58,9 +59,13 @@ func TestEnv(t *testing.T) {
58
59
})
59
60
defer runner .Close ()
60
61
id := uuid .New ()
62
+ script := "echo $CODER_SCRIPT_DATA_DIR\n echo $CODER_SCRIPT_BIN_DIR\n "
63
+ if runtime .GOOS == "windows" {
64
+ script = "echo %CODER_SCRIPT_DATA_DIR%\r \n echo %CODER_SCRIPT_BIN_DIR%\r \n "
65
+ }
61
66
err := runner .Init ([]codersdk.WorkspaceAgentScript {{
62
67
LogSourceID : id ,
63
- Script : "echo $CODER_SCRIPT_DATA_DIR \n echo $CODER_SCRIPT_BIN_DIR \n " ,
68
+ Script : script ,
64
69
}})
65
70
require .NoError (t , err )
66
71
require .NoError (t , runner .Execute (context .Background (), func (script codersdk.WorkspaceAgentScript ) bool {
You can’t perform that action at this time.
0 commit comments