Skip to content

Commit

Permalink
use UserHomeDir in stdmod lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
hidetatz committed Jul 30, 2023
1 parent cc55f9e commit d9bc786
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions stdmod.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package main

import (
"os"
"path/filepath"
)

var stdmods = []string{
"os",
}
Expand All @@ -15,8 +20,6 @@ func isstdmod(target string) bool {
}

func stdmoddir() string {
// todo: In Python, stdlib locates at "/usr/lib/python3.x".
// On distribution, the stdlib must be placed such directory and
// this must point there.
return "/home/hidetatz/shiba/std"
home, _ := os.UserHomeDir()
return filepath.Join(home, "shiba/std")
}

0 comments on commit d9bc786

Please sign in to comment.