fix another bug

This commit is contained in:
Shreyas Goenka 2025-01-06 15:54:13 +05:30
parent 9f83fe0362
commit 00266cb8b3
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 7 additions and 3 deletions

View File

@ -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,

View File

@ -54,9 +54,9 @@ func (r Resolver) Resolve(ctx context.Context) (*Template, error) {
if err != nil {
return nil, err
}
}
} else {
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.