Skip to content

fix(jh): honour JULIA_DEPOT_PATH rather than .julia#16

Open
thelonewolf1603 wants to merge 1 commit intomainfrom
nd/fix-jh-run-depot
Open

fix(jh): honour JULIA_DEPOT_PATH rather than .julia#16
thelonewolf1603 wants to merge 1 commit intomainfrom
nd/fix-jh-run-depot

Conversation

@thelonewolf1603
Copy link

fixes #8

@thelonewolf1603 thelonewolf1603 changed the title fix(jh): honour JULIA_DePOT_PATH rather than .julia fix(jh): honour JULIA_DEPOT_PATH rather than .julia Jan 28, 2026
homeDir, err := os.UserHomeDir()
if err != nil {
return err
// Determine Julia depot path
Copy link
Member

@vdayanand vdayanand Feb 6, 2026

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

Comment on lines +11 to +27
// 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")
Copy link
Member

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jh run should copy to JULIA_DEPOT_PATH, not the ~/.julia

2 participants