You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: os/user.Current() ignores $HOME, breaks on aarch64-darwin #580
On aarch64-darwin, Go's os/user.Current() performs a C library / system call that does not respect the $HOME environment variable. Since modctl version (like all cobra commands) calls config.NewRoot() → user.Current() → filepath.Join(user.HomeDir, ".modctl"), a ~/.modctl directory is created using the system-level home directory rather than the $HOME override.
This is particularly problematic in test environments where $HOME is set to a temporary directory, the actual home directory is still used, leading to unexpected filesystem side effects or permission errors.
Maybe replacing os/user.Current() with os.UserHomeDir() in pkg/config/root.go, which reads $HOME first is a better solution?
Activity