Skip to content

Commit e1aaf20

Browse files
Read API token from DEPOT_TOKEN env var
1 parent 44a64f3 commit e1aaf20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cmd/build/build.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ func NewCmdBuild() *cobra.Command {
3131
return errors.Errorf("unknown project ID (use --project or $DEPOT_PROJECT_ID)")
3232
}
3333

34+
// TODO: make this a helper
35+
if options.token == "" {
36+
options.token = os.Getenv("DEPOT_TOKEN")
37+
}
3438
if options.token == "" {
3539
options.token = config.GetApiToken()
3640
}

0 commit comments

Comments
 (0)