diff --git a/pkg/cmd/codespace/create.go b/pkg/cmd/codespace/create.go index 8e7a577e2..d95bfba1e 100644 --- a/pkg/cmd/codespace/create.go +++ b/pkg/cmd/codespace/create.go @@ -21,7 +21,7 @@ type createOptions struct { machine string showStatus bool permissionsOptOut bool - devContainerPath string + devContainerPath string idleTimeout time.Duration } @@ -123,8 +123,8 @@ func (a *App) Create(ctx context.Context, opts createOptions) error { devContainerPathQuestion := &survey.Question{ Name: "devContainerPath", Prompt: &survey.Select{ - Message: "Devcontainer.json file:", - Options: append([]string{"none"}, devContainerPaths...), + Message: "Devcontainer definition file:", + Options: append([]string{"default"}, devContainerPaths...), }, } @@ -133,7 +133,7 @@ func (a *App) Create(ctx context.Context, opts createOptions) error { } } - if devContainerPath == "none" { + if devContainerPath == "default" { // special arg allows users to opt out of devcontainer.json selection devContainerPath = "" } diff --git a/pkg/cmd/codespace/create_test.go b/pkg/cmd/codespace/create_test.go index 0c87ba9e0..9d97e3700 100644 --- a/pkg/cmd/codespace/create_test.go +++ b/pkg/cmd/codespace/create_test.go @@ -154,7 +154,7 @@ func TestApp_Create(t *testing.T) { wantErr: true, wantErrMsg: "error getting devcontainer.json paths: some error", }, - { + { name: "create codespace that requires accepting additional permissions", fields: fields{ apiClient: &apiClientMock{ diff --git a/testdevcontainer b/testdevcontainer new file mode 100644 index 000000000..1168d0af0 --- /dev/null +++ b/testdevcontainer @@ -0,0 +1,6 @@ +{ + "repository_id": 392831291, + "location": "WestUs2", + "devcontainer_path": ".devcontainer/foo ' \" bar/devcontainer.json", + "vscs_target": "development" +}