Skip to content

Commit a01dda6

Browse files
committed
Error out if required config is absent
There's no point to continue if Client ID and/or Client Secret are missing.
1 parent 83aad6b commit a01dda6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,16 @@ func main() {
206206
clientSecret = *clientSecretFlag
207207
}
208208

209+
if clientID == "" {
210+
fmt.Println("No Client ID specified.")
211+
os.Exit(1)
212+
}
213+
214+
if clientSecret == "" {
215+
fmt.Println("No Client Secret specified.")
216+
os.Exit(1)
217+
}
218+
209219
launchBrowser(*openBrowser, oauthUrl, clientID)
210220

211221
reader := bufio.NewReader(os.Stdin)

0 commit comments

Comments
 (0)