Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewClient(opts ...replicate.ClientOption) (*replicate.Client, error) {
return nil, fmt.Errorf("failed to get API token: %w", err)
}
if token == "" {
return nil, fmt.Errorf("please authenticate with `replicate login`")
return nil, fmt.Errorf("please authenticate with `replicate auth login`")
}

userAgent := fmt.Sprintf("replicate/%s", internal.Version())
Expand Down
3 changes: 3 additions & 0 deletions internal/cmd/auth/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ You can find your Replicate API token at https://replicate.com/account`,
if err != nil {
return fmt.Errorf("failed to read token from stdin: %w", err)
}
if token == "" {
return fmt.Errorf("no token provided (empty string)")
}
} else {
return fmt.Errorf("token must be passed to stdin with --token-stdin flag")
}
Expand Down