File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ await cmd.parse(Deno.args).catch((err) => {
44
44
Deno . exit ( err . exitCode ) ;
45
45
} else {
46
46
console . error ( `Error: ${ err . message } ` ) ;
47
- console . error ( err ) ;
48
47
49
48
Deno . exit ( 1 ) ;
50
49
}
Original file line number Diff line number Diff line change 1
- import { base64 , cliffy } from "../deps.ts" ;
1
+ import { base64 } from "../deps.ts" ;
2
2
import { loadConfig } from "../config.ts" ;
3
3
/**
4
4
* Parse cli config and return a basic auth header string
@@ -20,12 +20,12 @@ export async function parseAuth(options: {
20
20
apiKey = config . apiKey ;
21
21
}
22
22
23
- if ( ! email ) {
24
- throw new cliffy . ValidationError ( "email" ) ;
25
- }
26
- if ( ! apiKey ) {
27
- throw new cliffy . ValidationError ( "apiKey" ) ;
23
+ if ( ! email || ! apiKey ) {
24
+ throw new Error (
25
+ `Not authenticated, please run "upstash auth login" or specify your config file with "--config=/path/to/.upstash.json"` ,
26
+ ) ;
28
27
}
28
+
29
29
return await Promise . resolve (
30
30
`Basic ${ base64 . encode ( [ email , apiKey ] . join ( ":" ) ) } ` ,
31
31
) ;
You can’t perform that action at this time.
0 commit comments