File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ githooks:
4
4
ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
5
5
6
6
install : githooks
7
- npm install
7
+ npm install --no-optional
8
8
9
9
test :
10
10
npm test
Original file line number Diff line number Diff line change 1
1
const { CLI_NAME } = require ( './config' ) ;
2
2
const { TwilioCliError } = require ( './error' ) ;
3
3
const { HELP_ENVIRONMENT_VARIABLES } = require ( './messaging/help-messages' ) ;
4
+ const { logger } = require ( './messaging/logging' ) ;
4
5
5
6
const STORAGE_LOCATIONS = {
6
7
KEYCHAIN : 'keychain' ,
@@ -25,7 +26,11 @@ class SecureStorage {
25
26
if ( ! this . keytar ) {
26
27
try {
27
28
this . keytar = await this . command . install ( 'keytar' ) ;
29
+
30
+ // Also sanity-check that we can retrieve passwords (just use a dummy profile ID).
31
+ await this . keytar . getPassword ( CLI_NAME , CLI_NAME ) ;
28
32
} catch ( error ) {
33
+ logger . debug ( `Error loading keytar: ${ error } ` ) ;
29
34
// If we can't load up keytar, tell the user that maybe they should just stick to env vars.
30
35
throw new TwilioCliError ( 'Secure credential storage failed to load.\n\n' + HELP_ENVIRONMENT_VARIABLES ) ;
31
36
}
You can’t perform that action at this time.
0 commit comments