Skip to content

Commit

Permalink
Handle background push without installation ID
Browse files Browse the repository at this point in the history
Addressed #1003. Someone got confused enough to write in (and I don't blame them). Seems more user friendly to point out the problem than to silently do nothing.
  • Loading branch information
dinosaursrarr committed Apr 30, 2024
1 parent e09293d commit d16dd49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func push(cmd *cobra.Command, args []string) error {
installationID = args[2]
}

if background && len(installationID) == 0 {
return fmt.Errorf("Background push won't do anything unless you also specify an installation ID")
}

if apiToken == "" {
apiToken = os.Getenv(APITokenEnv)
}
Expand Down

0 comments on commit d16dd49

Please sign in to comment.