mirror of https://github.com/databricks/cli.git
remove default for config file
This commit is contained in:
parent
0b62f6d258
commit
8b8320554c
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"path/filepath"
|
||||
)
|
||||
|
||||
const ConfigFileName = "config.json"
|
||||
const schemaFileName = "schema.json"
|
||||
const templateDirName = "template"
|
||||
|
||||
|
|
Loading…
Reference in New Issue