remove default for config file

This commit is contained in:
Shreyas Goenka 2023-05-23 18:49:15 +02:00
parent 0b62f6d258
commit 8b8320554c
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 1 additions and 7 deletions

View File

@ -1,8 +1,6 @@
package bundle
import (
"path/filepath"
"github.com/databricks/cli/libs/template"
"github.com/spf13/cobra"
)
@ -13,10 +11,6 @@ var initCmd = &cobra.Command{
Long: `Initialize template`,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
// initialize default value for config file path
if configFile == "" {
configFile = filepath.Join(targetDir, template.ConfigFileName)
}
return template.Materialize(args[0], targetDir, configFile)
},
}
@ -27,5 +21,6 @@ var configFile string
func init() {
initCmd.Flags().StringVar(&targetDir, "target-dir", ".", "path to directory template will be initialized in")
initCmd.Flags().StringVar(&configFile, "config-file", "", "path to config to use for template initialization")
initCmd.MarkFlagRequired("config-file")
AddCommand(initCmd)
}

View File

@ -4,7 +4,6 @@ import (
"path/filepath"
)
const ConfigFileName = "config.json"
const schemaFileName = "schema.json"
const templateDirName = "template"