mirror of
https://github.com/LukeHagar/sailpoint-cli.git
synced 2025-12-09 20:57:44 +00:00
save config change
This commit is contained in:
@@ -60,6 +60,11 @@ func NewEnvironmentCommand() *cobra.Command {
|
||||
fmt.Printf("no environment provided")
|
||||
}
|
||||
|
||||
err = config.SaveConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
@@ -65,6 +65,11 @@ func newAuthCommand() *cobra.Command {
|
||||
return fmt.Errorf("invalid selection")
|
||||
}
|
||||
|
||||
err = config.SaveConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
@@ -29,6 +29,11 @@ func newDebugCommand() *cobra.Command {
|
||||
viper.Set("debug", false)
|
||||
}
|
||||
|
||||
err = config.SaveConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ func newExportTemplateCommand() *cobra.Command {
|
||||
|
||||
config.SetCustomExportTemplatePath(args[0])
|
||||
|
||||
err = config.SaveConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ func newSearchTemplateCommand() *cobra.Command {
|
||||
|
||||
config.SetCustomSearchTemplatePath(args[0])
|
||||
|
||||
err = config.SaveConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
2
main.go
2
main.go
@@ -5,7 +5,6 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/sailpoint-oss/sailpoint-cli/cmd/root"
|
||||
"github.com/sailpoint-oss/sailpoint-cli/internal/config"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -21,7 +20,6 @@ func init() {
|
||||
// goes wrong. This will exit the cli container during pipeline build and fail that stage.
|
||||
func main() {
|
||||
err := rootCmd.Execute()
|
||||
config.SaveConfig()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user