-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dir no longer panics when HOME and XDG_CONFIG_HOME are not set (#…
…449) (#450) This PR addresses the issue #446 for `release-1.1` branch This commit was cherry picked from commit 4d76f9a 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: JasonTheDeveloper <[email protected]> Co-authored-by: Shiwei Zhang <[email protected]> Co-authored-by: Patrick Zheng <[email protected]>
- Loading branch information
1 parent
0989bf5
commit e6c7fef
Showing
4 changed files
with
58 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters