diff --git a/pkg/cmd/build/build.go b/pkg/cmd/build/build.go index bbc32068f..9a17f73d1 100644 --- a/pkg/cmd/build/build.go +++ b/pkg/cmd/build/build.go @@ -56,7 +56,7 @@ func NewCobraCmd(build *BuildCmd) *cobra.Command { buildCmd.Flags().StringVar(&fields.NodePolyfills, "use-node-polyfills", "", msg.FlagPolyfill) buildCmd.Flags().StringVar(&fields.OwnWorker, "use-own-worker", "", msg.FlagWorker) buildCmd.Flags().BoolVar(&fields.IsFirewall, "firewall", false, msg.IsFirewall) - buildCmd.Flags().StringVar(&fields.ProjectPath, "--config-dir", "azion", msg.ProjectConfFlag) + buildCmd.Flags().StringVar(&fields.ProjectPath, "config-dir", "azion", msg.ProjectConfFlag) return buildCmd } diff --git a/pkg/cmd/delete/edge_application/edge_application.go b/pkg/cmd/delete/edge_application/edge_application.go index 455d52e76..cb8eb95bf 100644 --- a/pkg/cmd/delete/edge_application/edge_application.go +++ b/pkg/cmd/delete/edge_application/edge_application.go @@ -63,7 +63,7 @@ func NewCobraCmd(delete *DeleteCmd) *cobra.Command { cmd.Flags().Int64Var(&application_id, "application-id", 0, msg.FlagId) cmd.Flags().Bool("cascade", true, msg.CascadeFlag) cmd.Flags().BoolP("help", "h", false, msg.HelpFlag) - cmd.Flags().StringVar(&ProjectConf, "--config-dir", "azion", msg.CONFDIRFLAG) + cmd.Flags().StringVar(&ProjectConf, "config-dir", "azion", msg.CONFDIRFLAG) return cmd } diff --git a/pkg/cmd/sync/sync.go b/pkg/cmd/sync/sync.go index 49d1f26be..396406e09 100644 --- a/pkg/cmd/sync/sync.go +++ b/pkg/cmd/sync/sync.go @@ -46,7 +46,7 @@ func NewCobraCmd(sync *SyncCmd) *cobra.Command { }, } syncCmd.Flags().BoolP("help", "h", false, msg.HELPFLAG) - syncCmd.Flags().StringVar(&ProjectConf, "--config-dir", "azion", msg.CONFDIRFLAG) + syncCmd.Flags().StringVar(&ProjectConf, "config-dir", "azion", msg.CONFDIRFLAG) return syncCmd } diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index 30c38ab99..38dbdcc6e 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -8,6 +8,5 @@ var ( ) const ( - PathAzionJson = "/azion/azion.json" - FORMAT_DATE = "2006-01-02 15:04:05 -0700 MST" + FORMAT_DATE = "2006-01-02 15:04:05 -0700 MST" ) diff --git a/utils/helpers.go b/utils/helpers.go index 9fdcf01e7..b31d2ee8f 100644 --- a/utils/helpers.go +++ b/utils/helpers.go @@ -237,26 +237,6 @@ func GetAzionJsonContent(confPath string) (*contracts.AzionApplicationOptions, e return conf, nil } -func GetAzionJsonSimple() (*contracts.AzionApplicationSimple, error) { - path, err := GetWorkingDir() - if err != nil { - return nil, err - } - jsonConf := path + "/azion/azion.json" - file, err := os.ReadFile(jsonConf) - if err != nil { - return nil, ErrorOpeningAzionJsonFile - } - - conf := &contracts.AzionApplicationSimple{} - err = json.Unmarshal(file, &conf) - if err != nil { - return nil, ErrorUnmarshalAzionJsonFile - } - - return conf, nil -} - func WriteAzionJsonContent(conf *contracts.AzionApplicationOptions, confPath string) error { wd, err := GetWorkingDir() if err != nil {