Add license command

This commit is contained in:
M. Mert Yildiran
2023-07-06 21:57:21 +03:00
parent cfa12ea45e
commit b4e8573634
2 changed files with 23 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ func InitConfig(cmd *cobra.Command) error {
"console",
"pro",
"manifests",
"license",
}, cmd.Use) {
go version.CheckNewerVersion()
}
@@ -80,6 +81,7 @@ func InitConfig(cmd *cobra.Command) error {
ConfigFilePath = path.Join(misc.GetDotFolderPath(), "config.yaml")
if err := loadConfigFile(&Config, utils.Contains([]string{
"manifests",
"license",
}, cmd.Use)); err != nil {
if !os.IsNotExist(err) {
return fmt.Errorf("invalid config, %w\n"+