Skip to content

Commit

Permalink
fix: remove ToUpper for envs, since koanf respects the registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Dec 2, 2024
1 parent db6b62e commit 76649a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions internal/lefthook/runner/exec/execute_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"

"github.com/creack/pty"
"github.com/mattn/go-isatty"
Expand Down Expand Up @@ -44,7 +43,7 @@ func (e CommandExecutor) Execute(ctx context.Context, opts Options, in io.Reader
for name, value := range opts.Env {
envs = append(
envs,
fmt.Sprintf("%s=%s", strings.ToUpper(name), os.ExpandEnv(value)),
fmt.Sprintf("%s=%s", name, os.ExpandEnv(value)),
)
}
switch log.Colors() {
Expand Down
2 changes: 1 addition & 1 deletion internal/lefthook/runner/exec/execute_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (e CommandExecutor) Execute(ctx context.Context, opts Options, in io.Reader
for name, value := range opts.Env {
envs = append(
envs,
fmt.Sprintf("%s=%s", strings.ToUpper(name), os.ExpandEnv(value)),
fmt.Sprintf("%s=%s", name, os.ExpandEnv(value)),
)
}
switch log.Colors() {
Expand Down

0 comments on commit 76649a3

Please sign in to comment.