mirror of https://github.com/databricks/cli.git
fixes
This commit is contained in:
parent
90d6490106
commit
e51037ff4b
|
@ -40,13 +40,6 @@ func Materialize(ctx context.Context, configFilePath, templateRoot, outputDir st
|
|||
return err
|
||||
}
|
||||
|
||||
if outputDir == "" {
|
||||
outputDir, err = os.Getwd()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
templatePath := filepath.Join(templateRoot, templateDirName)
|
||||
libraryPath := filepath.Join(templateRoot, libraryDirName)
|
||||
schemaPath := filepath.Join(templateRoot, schemaFileName)
|
||||
|
|
|
@ -153,12 +153,17 @@ func (r *renderer) computeFile(relPathTemplate string) (file, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
rootPath, err := filepath.Abs(r.instanceRoot)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If file name does not specify the `.tmpl` extension, then it is copied
|
||||
// over as is, without treating it as a template
|
||||
if !strings.HasSuffix(relPathTemplate, templateExtension) {
|
||||
return ©File{
|
||||
dstPath: &destinationPath{
|
||||
root: r.instanceRoot,
|
||||
root: rootPath,
|
||||
relPath: relPath,
|
||||
},
|
||||
perm: perm,
|
||||
|
@ -196,7 +201,7 @@ func (r *renderer) computeFile(relPathTemplate string) (file, error) {
|
|||
return &inMemoryFile{
|
||||
ctx: r.ctx,
|
||||
dstPath: &destinationPath{
|
||||
root: r.instanceRoot,
|
||||
root: rootPath,
|
||||
relPath: relPath,
|
||||
},
|
||||
perm: perm,
|
||||
|
|
Loading…
Reference in New Issue