Skip to content

Commit

Permalink
fix: use Executable instead of Args[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
gssbzn committed Oct 2, 2024
1 parent ec546b1 commit 8ed8c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/telemetry/installer_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

func readInstaller() *string {
if b, err := os.ReadFile(path.Join(path.Base(os.Args[0]), "installer")); err == nil {
if b, err := os.ReadFile(path.Join(path.Base(os.Executable()), "installer")); err == nil {

Check failure on line 25 in internal/telemetry/installer_windows.go

View workflow job for this annotation

GitHub Actions / unit-tests (windows-latest)

too many arguments in call to path.Base

Check failure on line 25 in internal/telemetry/installer_windows.go

View workflow job for this annotation

GitHub Actions / unit-tests (windows-latest)

too many arguments in call to path.Base
s := string(b)
return &s
}
Expand Down

0 comments on commit 8ed8c69

Please sign in to comment.