diff --git a/cmd/ghcs/main.go b/cmd/ghcs/main.go index 400f5324c..ce8ec91e6 100644 --- a/cmd/ghcs/main.go +++ b/cmd/ghcs/main.go @@ -22,6 +22,11 @@ var rootCmd = &cobra.Command{ } func Execute() { + if os.Getenv("GITHUB_TOKEN") == "" { + fmt.Println("The GITHUB_TOKEN environment variable is required. Create a Personal Access Token with org SSO access at https://github.com/settings/tokens/new.") + os.Exit(1) + } + if err := rootCmd.Execute(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1)