-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stop using "golang.org/x/sys/unix" on Windows
- Loading branch information
1 parent
ff56b9e
commit 71770eb
Showing
3 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//go:build !windows | ||
// +build !windows | ||
|
||
package exec | ||
|
||
import ( | ||
"os" | ||
"path/filepath" | ||
|
||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func (exe *executor) ExecXSys(exePath string, args []string) error { | ||
return unix.Exec(exePath, append([]string{filepath.Base(exePath)}, args...), os.Environ()) //nolint:wrapcheck | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build windows | ||
// +build windows | ||
|
||
package exec | ||
|
||
import "errors" | ||
|
||
var errXSysNotSuppported = errors.New("Windows doesn't support AQUA_EXPERIMENTAL_X_SYS_EXEC") | ||
|
||
func (exe *executor) ExecXSys(exePath string, args []string) error { | ||
return errXSysNotSuppported | ||
} |