Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 6a76b7d

Browse files
authored
feat: Remove autostart ed notice (#319)
1 parent 2b0af5a commit 6a76b7d

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

internal/cmd/envs.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010

1111
"cdr.dev/coder-cli/coder-sdk"
1212
"cdr.dev/coder-cli/internal/coderutil"
13-
"cdr.dev/coder-cli/internal/config"
1413
"cdr.dev/coder-cli/internal/x/xcobra"
1514
"cdr.dev/coder-cli/pkg/clog"
1615
"cdr.dev/coder-cli/pkg/tablewriter"
@@ -184,9 +183,6 @@ func createEnvCmd() *cobra.Command {
184183
Example: `# create a new environment using default resource amounts
185184
coder envs create my-new-env --image ubuntu
186185
coder envs create my-new-powerful-env --cpu 12 --disk 100 --memory 16 --image ubuntu`,
187-
PreRun: func(cmd *cobra.Command, args []string) {
188-
autoStartInfo()
189-
},
190186
RunE: func(cmd *cobra.Command, args []string) error {
191187
ctx := cmd.Context()
192188
if img == "" {
@@ -440,9 +436,6 @@ func editEnvCmd() *cobra.Command {
440436
Example: `coder envs edit back-end-env --cpu 4
441437
442438
coder envs edit back-end-env --disk 20`,
443-
PreRun: func(cmd *cobra.Command, args []string) {
444-
autoStartInfo()
445-
},
446439
RunE: func(cmd *cobra.Command, args []string) error {
447440
ctx := cmd.Context()
448441
client, err := newClient(ctx)
@@ -684,18 +677,3 @@ func buildUpdateReq(ctx context.Context, client coder.Client, conf updateConf) (
684677
}
685678
return &updateReq, nil
686679
}
687-
688-
// TODO (Grey): Remove education in a future non-patch release.
689-
func autoStartInfo() {
690-
var preferencesURI string
691-
692-
accessURI, err := config.URL.Read()
693-
if err != nil {
694-
// Error is fairly benign in this case, fallback to relative URI
695-
preferencesURI = "/preferences"
696-
} else {
697-
preferencesURI = fmt.Sprintf("%s%s", accessURI, "/preferences?tab=autostart")
698-
}
699-
700-
clog.LogInfo("⚡NEW: Automate daily environment startup", "Visit "+preferencesURI+" to configure your preferred time")
701-
}

internal/cmd/rebuild.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ func rebuildEnvCommand() *cobra.Command {
2727
Args: xcobra.ExactArgs(1),
2828
Example: `coder envs rebuild front-end-env --follow
2929
coder envs rebuild backend-env --force`,
30-
PreRun: func(cmd *cobra.Command, args []string) {
31-
autoStartInfo()
32-
},
3330
RunE: func(cmd *cobra.Command, args []string) error {
3431
ctx := cmd.Context()
3532
client, err := newClient(ctx)

0 commit comments

Comments
 (0)