Skip to content

Commit

Permalink
fix: expand clone env value
Browse files Browse the repository at this point in the history
The clone env value can be a path, like `SSH_AUTH_SOCK: ~/bar/baz`, so
expand the value with `ExpandUser` to ensure that paths are correctly
evaluated.
  • Loading branch information
femnad committed Jan 26, 2024
1 parent a687e5d commit 85673ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions entity/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func CloneUnderPath(repo Repo, dir string, cloneEnv map[string]string) error {
modifiedEnv := make(map[string]string)
newEnv := make(map[string]bool)
for k, v := range cloneEnv {
v = internal.ExpandUser(v)
envVal, ok := os.LookupEnv(k)
if ok {
modifiedEnv[k] = envVal
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
version = "0.31.3"
version = "0.31.4"
)

type args struct {
Expand Down

0 comments on commit 85673ea

Please sign in to comment.