mirror of https://github.com/databricks/cli.git
fix another bug
This commit is contained in:
parent
9f83fe0362
commit
00266cb8b3
|
@ -38,8 +38,12 @@ See https://docs.databricks.com/en/dev-tools/bundles/templates.html for more inf
|
|||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) error {
|
||||
var templatePathOrUrl string
|
||||
if len(args) > 0 {
|
||||
templatePathOrUrl = args[0]
|
||||
}
|
||||
r := template.Resolver{
|
||||
TemplatePathOrUrl: args[0],
|
||||
TemplatePathOrUrl: templatePathOrUrl,
|
||||
ConfigFile: configFile,
|
||||
OutputDir: outputDir,
|
||||
TemplateDir: templateDir,
|
||||
|
|
|
@ -54,10 +54,10 @@ func (r Resolver) Resolve(ctx context.Context) (*Template, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
templateName = TemplateName(r.TemplatePathOrUrl)
|
||||
}
|
||||
|
||||
templateName = TemplateName(r.TemplatePathOrUrl)
|
||||
|
||||
// User should not directly select "custom" and instead should provide the
|
||||
// file path or the Git URL for the template directly.
|
||||
// Custom is just for internal representation purposes.
|
||||
|
|
Loading…
Reference in New Issue