Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Executable instead of Args[0] #3296

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
)

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
Loading