Skip to content
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

fix: dir no longer panics when HOME and XDG_CONFIG_HOME are not set #451

Merged
merged 1 commit into from
Sep 5, 2024

Commits on Sep 4, 2024

  1. fix: dir no longer panics when HOME and XDG_CONFIG_HOME are not set (n…

    …otaryproject#449)
    
    This PR addresses the issue notaryproject#446
    
    In this PR I:
    
    - I removed the `init()` function from `dir/path`
    - When `userConfigDir()` returns an error, instead of `panic(err)` I
    default to the current directory instead
    - Split `loadUserPath()` into two new functions used to setup and return
    the values for `UserConfigDir` and `UserLibexecDir`
    - Added additional unit tests for the two new functions and to test the
    default directory is used when `HOME` is set to `""`
    
    ---------
    
    Signed-off-by: Jason <[email protected]>
    Signed-off-by: JasonTheDeveloper <[email protected]>
    Signed-off-by: Patrick Zheng <[email protected]>
    Co-authored-by: Shiwei Zhang <[email protected]>
    Co-authored-by: Patrick Zheng <[email protected]>
    3 people committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    0e4fbf0 View commit details
    Browse the repository at this point in the history