Skip to content

Commit

Permalink
Read API token from DEPOT_TOKEN env var
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Mar 19, 2022
1 parent 44a64f3 commit e1aaf20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cmd/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func NewCmdBuild() *cobra.Command {
return errors.Errorf("unknown project ID (use --project or $DEPOT_PROJECT_ID)")
}

// TODO: make this a helper
if options.token == "" {
options.token = os.Getenv("DEPOT_TOKEN")
}
if options.token == "" {
options.token = config.GetApiToken()
}
Expand Down

0 comments on commit e1aaf20

Please sign in to comment.