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