We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TARGETPLATFORM
1 parent 60f71c1 commit b137c8eCopy full SHA for b137c8e
scripts/buildinputs/buildinputs.go
@@ -9,15 +9,18 @@ import (
9
10
func main() {
11
targetPlatform := os.Getenv("TARGETPLATFORM")
12
+ if targetPlatform == "" {
13
+ panic("TARGETPLATFORM environment variable is required")
14
+ }
15
platformFields := strings.Split(targetPlatform, "/")
16
if len(platformFields) != 2 {
- panic(fmt.Sprint(targetPlatform, "format is invalid, should be os/arch"))
17
+ panic(fmt.Sprintf("TARGETPLATFORM format is invalid: %q, should be os/arch", targetPlatform))
18
}
19
targetOs := platformFields[0]
20
targetArch := platformFields[1]
21
22
if targetOs != "linux" {
- panic(fmt.Sprint(targetOs, "not supported"))
23
+ panic(fmt.Sprintf("%s not supported", targetOs))
24
25
26
flag.Parse()
0 commit comments