You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boardPtr:=flag.String("board", "all", "(Optional) board name. If not specified, skips that apply to all boards will be returned.")
94
99
branchPtr:=flag.String("branch", "all", "(Optional) branch name. If not specified, skips that apply to all branches will be returned.")
95
100
environmentPtr:=flag.String("environment", "all", "(Optional) environment name. If not specified, skips that apply to all environments will be returned.")
96
-
skipfilePtr:=flag.String("skipfile", "", "Required. Skipfile in yaml format.")
97
101
flag.Parse()
98
102
99
-
iflen(*skipfilePtr) <1 {
100
-
fmt.Fprintf(os.Stderr, "Error: -skipfile not provided\n")
101
-
os.Exit(1)
103
+
iflen(flag.Args()) <1 {
104
+
fmt.Fprintf(os.Stderr, "Error: skipfile not provided\n\n")
105
+
usage()
102
106
}
103
107
104
-
_, err:=os.Stat(*skipfilePtr)
108
+
skipfile:=flag.Arg(0)
109
+
110
+
_, err:=os.Stat(skipfile)
105
111
ifos.IsNotExist(err) {
106
-
fmt.Fprintf(os.Stderr, "Error: skipfile '%s' not found\n", *skipfilePtr)
107
-
os.Exit(1)
112
+
fmt.Fprintf(os.Stderr, "Error: skipfile '%s' not found\n\n", skipfile)
0 commit comments