Skip to content

Commit

Permalink
fix: update function signature for UserEnv
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Nov 12, 2024
1 parent 40f93f1 commit 9e5c1a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/e2e/internal/utils/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewVirtualHost(binPath string, options ...HostOption) (*VirtualHost, error)
vhost.userDir = ginkgo.GinkgoT().TempDir()

// set user dir environment variables
vhost.UpdateEnv(UserConfigEnv(vhost.userDir))
vhost.UpdateEnv(UserEnv(vhost.userDir))

// set options
vhost.SetOption(options...)
Expand Down Expand Up @@ -77,9 +77,10 @@ func (h *VirtualHost) SetOption(options ...HostOption) {
// HostOption is a function to set the host configuration.
type HostOption func(vhost *VirtualHost) error

// UserConfigEnv creates environment variable for changing
// user config dir (By setting $XDG_CONFIG_HOME).
func UserConfigEnv(dir string) map[string]string {
// UserEnv creates environment variable for changing
// user config dir by setting $XDG_CONFIG_HOME and user cache dir by
// setting $NOTATION_CACHE.
func UserEnv(dir string) map[string]string {
// create and set user dir for linux
return map[string]string{
"XDG_CONFIG_HOME": dir,
Expand Down

0 comments on commit 9e5c1a7

Please sign in to comment.