Skip to content

Commit bac8afa

Browse files
committed
feat: output the project or app environment variable specifics added
1 parent ae490ab commit bac8afa

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

cmd/env/add.go

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,27 @@ func runEnvAddCommandFunc(clients *shared.ClientFactory, cmd *cobra.Command, arg
137137
if err != nil {
138138
return err
139139
}
140+
clients.IO.PrintTrace(ctx, slacktrace.EnvAddSuccess)
141+
clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
142+
Emoji: "evergreen_tree",
143+
Text: "App Environment",
144+
Secondary: []string{
145+
fmt.Sprintf("Successfully added \"%s\" as an app environment variable", variableName),
146+
},
147+
}))
140148
} else {
141149
err = slackdotenv.Set(clients.Fs, variableName, variableValue)
142150
if err != nil {
143151
return err
144152
}
153+
clients.IO.PrintTrace(ctx, slacktrace.EnvAddSuccess)
154+
clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
155+
Emoji: "evergreen_tree",
156+
Text: "App Environment",
157+
Secondary: []string{
158+
fmt.Sprintf("Successfully added \"%s\" as a project environment variable", variableName),
159+
},
160+
}))
145161
}
146-
147-
clients.IO.PrintTrace(ctx, slacktrace.EnvAddSuccess)
148-
clients.IO.PrintInfo(ctx, false, "\n%s", style.Sectionf(style.TextSection{
149-
Emoji: "evergreen_tree",
150-
Text: "App Environment",
151-
Secondary: []string{
152-
fmt.Sprintf(
153-
"Successfully added \"%s\" as an environment variable",
154-
variableName,
155-
),
156-
},
157-
}))
158162
return nil
159163
}

0 commit comments

Comments
 (0)