Skip to content

Commit 99680de

Browse files
committed
Handles scope deprecation
1 parent c5be91e commit 99680de

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cmd/variables.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ func addOrUpdateVariable(cmd *cobra.Command, args []string) error {
6262
return err
6363
}
6464

65+
if strings.ToLower(varScope) == "internal_container_registry" {
66+
return handleNilResults("Variable scope \"internal_container_registry\" is deprecated & can no longer be set.\n", cmd)
67+
}
68+
6569
current := lagoonCLIConfig.Current
6670
token := lagoonCLIConfig.Lagoons[current].Token
6771
lc := lclient.New(
@@ -190,11 +194,11 @@ var deleteVariableCmd = &cobra.Command{
190194
func init() {
191195
addVariableCmd.Flags().StringP("name", "N", "", "Name of the variable to add")
192196
addVariableCmd.Flags().StringP("value", "V", "", "Value of the variable to add")
193-
addVariableCmd.Flags().StringP("scope", "S", "", "Scope of the variable[global, build, runtime, container_registry, internal_container_registry]")
197+
addVariableCmd.Flags().StringP("scope", "S", "", "Scope of the variable[global, build, runtime, container_registry]")
194198
addVariableCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to add variable to")
195199
updateVariableCmd.Flags().StringP("name", "N", "", "Name of the variable to update")
196200
updateVariableCmd.Flags().StringP("value", "V", "", "Value of the variable to update")
197-
updateVariableCmd.Flags().StringP("scope", "S", "", "Scope of the variable[global, build, runtime, container_registry, internal_container_registry]")
201+
updateVariableCmd.Flags().StringP("scope", "S", "", "Scope of the variable[global, build, runtime, container_registry]")
198202
updateVariableCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to update variable for")
199203
deleteVariableCmd.Flags().StringP("name", "N", "", "Name of the variable to delete")
200204
deleteVariableCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to delete variable from")

0 commit comments

Comments
 (0)