mirror of https://github.com/databricks/cli.git
Address comments
This commit is contained in:
parent
a7e5210355
commit
00eec5a230
|
@ -80,14 +80,9 @@ func (w *workspaceFilesExtensionsClient) getNotebookStatByNameWithExt(ctx contex
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the extension is one of .py, .r, .scala or .sql we expect the export format to be source.
|
// For non-jupyter notebooks the export format should be source.
|
||||||
// If it's not, return early.
|
// If it's not, return early.
|
||||||
if slices.Contains([]string{
|
if ext != notebook.ExtensionJupyter && stat.ReposExportFormat != workspace.ExportFormatSource {
|
||||||
notebook.ExtensionPython,
|
|
||||||
notebook.ExtensionR,
|
|
||||||
notebook.ExtensionScala,
|
|
||||||
notebook.ExtensionSql}, ext) &&
|
|
||||||
stat.ReposExportFormat != workspace.ExportFormatSource {
|
|
||||||
log.Debugf(ctx, "attempting to determine if %s could be a notebook. Found a notebook at %s but it is not exported as a source notebook. Its export format is %s.", name, path.Join(w.root, nameWithoutExt), stat.ReposExportFormat)
|
log.Debugf(ctx, "attempting to determine if %s could be a notebook. Found a notebook at %s but it is not exported as a source notebook. Its export format is %s.", name, path.Join(w.root, nameWithoutExt), stat.ReposExportFormat)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue