-
Notifications
You must be signed in to change notification settings - Fork 1
fix(jh): honour JULIA_DEPOT_PATH rather than .julia
#16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
JULIA_DEPOT_PATH rather than .julia
| homeDir, err := os.UserHomeDir() | ||
| if err != nil { | ||
| return err | ||
| // Determine Julia depot path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe its simpler rely on Base.DEPOT_PATH?. Oops, Didnt realize this was go
run.go
Outdated
| // Determine Julia depot path | ||
| var depotPath string | ||
| if juliaDepot := os.Getenv("JULIA_DEPOT_PATH"); juliaDepot != "" { | ||
| // Use first path from JULIA_DEPOT_PATH (paths are separated by : on Unix, ; on Windows) | ||
| depotPaths := filepath.SplitList(juliaDepot) | ||
| if len(depotPaths) > 0 { | ||
| depotPath = depotPaths[0] | ||
| } | ||
| } | ||
|
|
||
| // Fall back to ~/.julia if JULIA_DEPOT_PATH is not set | ||
| if depotPath == "" { | ||
| homeDir, err := os.UserHomeDir() | ||
| if err != nil { | ||
| return fmt.Errorf("failed to get user home directory: %w", err) | ||
| } | ||
| depotPath = filepath.Join(homeDir, ".julia") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a separate function so it can be reused ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we ruse getJuliaDepotPath in updateJuliaCredentialsIfNeeded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to push earlier 😅 , updated
fixes #8