Skip to content

Commit

Permalink
added check for local dir exists in offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
HariGS-DB committed Jan 27, 2025
1 parent 4ed82de commit d846c91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"python.analysis.stubPath": ".vscode",
"jupyter.interactiveWindow.cellMarker.codeRegex": "^# COMMAND ----------|^# Databricks notebook source|^(#\\s*%%|#\\s*\\<codecell\\>|#\\s*In\\[\\d*?\\]|#\\s*In\\[ \\])",
"jupyter.interactiveWindow.cellMarker.default": "# COMMAND ----------"
}
}
4 changes: 4 additions & 0 deletions cmd/labs/project/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ func (i *installer) Install(ctx context.Context, offlineInstall bool) error {
return fmt.Errorf("lib: %w", err)
}
}

if _, err := os.Stat(i.LibDir()); os.IsNotExist(err) {
return fmt.Errorf("no local installation found: %w", err)
}
err = i.setupPythonVirtualEnvironment(ctx, w)
if err != nil {
return fmt.Errorf("python: %w", err)
Expand Down

0 comments on commit d846c91

Please sign in to comment.