Skip to content

Commit

Permalink
Merge branch version/0-47-0-RC1 to adopt changes from PR #3563
Browse files Browse the repository at this point in the history
  • Loading branch information
as-builds committed Oct 28, 2024
2 parents c2d4663 + 31d8c7b commit db28382
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/osutils/shortcut/shortcut_windows.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package shortcut

import (
"errors"
"fmt"
"os"
"os/exec"
Expand Down Expand Up @@ -74,6 +75,9 @@ func (s *Shortcut) Enable() error {
cmd := exec.Command("powershell.exe", args...)
out, err := cmd.CombinedOutput()
if err != nil {
if errors.Is(err, exec.ErrNotFound) {
return locale.WrapError(err, "err_prepare_shortcut_powershell_not_found", "Could not create shortcut because powershell was not found on your PATH (searched '{{.V0}}')", os.Getenv("PATH"))
}
return locale.WrapError(err, "err_clean_start", "Could not create shortcut. Received error: {{.V0}}", string(out))
}

Expand Down

0 comments on commit db28382

Please sign in to comment.