forked from SAP/jenkins-library
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes
go build
on windows (SAP#4858)
* fixes `go build` on windows
- Loading branch information
Showing
3 changed files
with
29 additions
and
9 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,17 @@ | ||
//go:build !windows | ||
|
||
package cmd | ||
|
||
import ( | ||
"syscall" | ||
) | ||
|
||
func getSysProcAttr(uid int, gid int) *syscall.SysProcAttr { | ||
return &syscall.SysProcAttr{ | ||
Credential: &syscall.Credential{ | ||
Uid: uint32(uid), | ||
Gid: uint32(gid), | ||
NoSetGroups: true, | ||
}, | ||
} | ||
} |
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,11 @@ | ||
//go:build windows | ||
|
||
package cmd | ||
|
||
import ( | ||
"syscall" | ||
) | ||
|
||
func getSysProcAttr(_ int, _ int) *syscall.SysProcAttr { | ||
return &syscall.SysProcAttr{} | ||
} |