Skip to content

Commit

Permalink
Merge pull request #3276 from OpenNeuroOrg/cli-auth-fixes
Browse files Browse the repository at this point in the history
Provide correct error feedback for Deno CLI auth
  • Loading branch information
nellh authored Jan 14, 2025
2 parents 67ac848 + f80d95a commit c118f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export function getConfig(): ClientConfig {
const url = localStorage.getItem("url")
const token = localStorage.getItem("token")
const errorReporting = localStorage.getItem("errorReporting") === "true"
if (url && token && errorReporting) {
if (url && token) {
const config: ClientConfig = {
url,
token,
errorReporting,
}
return config
} else {
throw new LoginError("Run `openneuro login` before upload.")
throw new LoginError("Run `openneuro login` before running commands.")
}
}

Expand Down

0 comments on commit c118f15

Please sign in to comment.