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.PreRunE = root.MustWorkspaceClient
|
||||||
cmd.RunE = func(cmd *cobra.Command, args []string) error {
|
cmd.RunE = func(cmd *cobra.Command, args []string) error {
|
||||||
|
var templatePathOrUrl string
|
||||||
|
if len(args) > 0 {
|
||||||
|
templatePathOrUrl = args[0]
|
||||||
|
}
|
||||||
r := template.Resolver{
|
r := template.Resolver{
|
||||||
TemplatePathOrUrl: args[0],
|
TemplatePathOrUrl: templatePathOrUrl,
|
||||||
ConfigFile: configFile,
|
ConfigFile: configFile,
|
||||||
OutputDir: outputDir,
|
OutputDir: outputDir,
|
||||||
TemplateDir: templateDir,
|
TemplateDir: templateDir,
|
||||||
|
|
|
@ -54,9 +54,9 @@ func (r Resolver) Resolve(ctx context.Context) (*Template, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
templateName = TemplateName(r.TemplatePathOrUrl)
|
templateName = TemplateName(r.TemplatePathOrUrl)
|
||||||
|
}
|
||||||
|
|
||||||
// User should not directly select "custom" and instead should provide the
|
// User should not directly select "custom" and instead should provide the
|
||||||
// file path or the Git URL for the template directly.
|
// file path or the Git URL for the template directly.
|
||||||
|
|
Loading…
Reference in New Issue