fix: dir no longer panics when HOME and XDG_CONFIG_HOME are not set#449
Merged
JeyJeyGao merged 16 commits intonotaryproject:mainfrom Sep 4, 2024
Merged
Conversation
a02efc9 to
e816f4b
Compare
JeyJeyGao
reviewed
Sep 2, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #449 +/- ##
==========================================
+ Coverage 80.86% 80.98% +0.11%
==========================================
Files 33 33
Lines 2483 2487 +4
==========================================
+ Hits 2008 2014 +6
+ Misses 332 331 -1
+ Partials 143 142 -1 ☔ View full report in Codecov by Sentry. |
shizhMSFT
reviewed
Sep 3, 2024
Contributor
You need to fix it. |
Contributor
Author
@JeyJeyGao All my commits are signed though? DCO also passed the sign off checks. Not sure why GitHub is saying |
priteshbandi
approved these changes
Sep 4, 2024
7e26ba3 to
05b532f
Compare
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Co-authored-by: Shiwei Zhang <shizh@microsoft.com> Signed-off-by: JasonTheDeveloper <jagoodse@microsoft.com> Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Jason <jagoodse@microsoft.com>
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com> Signed-off-by: Jason <jagoodse@microsoft.com>
This PR targets on main branch. --------- Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com> Signed-off-by: Jason <jagoodse@microsoft.com>
d6a9725 to
ff67f65
Compare
JeyJeyGao
pushed a commit
to JeyJeyGao/notation-go
that referenced
this pull request
Sep 4, 2024
…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 <jagoodse@microsoft.com> Signed-off-by: JasonTheDeveloper <jagoodse@microsoft.com> Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com> Co-authored-by: Shiwei Zhang <shizh@microsoft.com> Co-authored-by: Patrick Zheng <patrickzheng@microsoft.com>
JeyJeyGao
pushed a commit
to JeyJeyGao/notation-go
that referenced
this pull request
Sep 4, 2024
…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 <jagoodse@microsoft.com> Signed-off-by: JasonTheDeveloper <jagoodse@microsoft.com> Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com> Co-authored-by: Shiwei Zhang <shizh@microsoft.com> Co-authored-by: Patrick Zheng <patrickzheng@microsoft.com>
JeyJeyGao
added a commit
that referenced
this pull request
Sep 5, 2024
…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 <jagoodse@microsoft.com> Signed-off-by: JasonTheDeveloper <jagoodse@microsoft.com> Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com> Co-authored-by: JasonTheDeveloper <jagoodse@microsoft.com> Co-authored-by: Shiwei Zhang <shizh@microsoft.com> Co-authored-by: Patrick Zheng <patrickzheng@microsoft.com>
JeyJeyGao
added a commit
that referenced
this pull request
Sep 9, 2024
## Release This would mean tagging 595c710 `v1.1.2` to release. ## Vote We need at least `4` approvals from `6` maintainers to release `notation-go v1.1.2`. - [x] Pritesh Bandi (@priteshbandi) - [x] Junjie Gao (@JeyJeyGao) - [ ] Rakesh Gariganti (@rgnote) - [ ] Milind Gokarn (@gokarnm) - [x] Shiwei Zhang (@shizhMSFT) - [x] Patrick Zheng (@Two-Hearts) ## What's Changed * fix&bump: maintenance update for branch `release-1.1` by @JeyJeyGao in #448 * fix: dir no longer panics when HOME and XDG_CONFIG_HOME are not set (#449) by @JeyJeyGao in #450 **Full Changelog**: v1.1.1...595c710 ## Actions Please review the PR and vote by approving. Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR addresses the issue #446
In this PR I:
init()function fromdir/pathuserConfigDir()returns an error, instead ofpanic(err)I default to the current directory insteadloadUserPath()into two new functions used to setup and return the values forUserConfigDirandUserLibexecDirHOMEis set to""