-
Notifications
You must be signed in to change notification settings - Fork 159
fix: Create default .azure directory if not present #318
Conversation
wbreza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| private subscriptions: any[] = []; | ||
|
|
||
| public constructor(private tokenPath: string = DEFAULT_SLS_TOKEN_FILE) { | ||
| if(tokenPath === DEFAULT_SLS_TOKEN_FILE && !fs.existsSync(CONFIG_DIRECTORY)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing - Run auto-format
tbarlow12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, looks like your tests are failing on Windows, though
2c013ca to
d9c7aec
Compare
wbreza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get the tests fixed first.
ba288cb to
8fad3a2
Compare
wbreza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are now passing
* Check for .azure directory * Add test * Add recursion to make local .azure folder * Mock os to fix widnows test * Attempt to fixd windows test with mock * Fixing tests, still failing to mkdir * Fix test by resetting filepath in token constructor * Fix test withmockRestore * test: Updated token cache tests
fix: Create default .azure directory if not present
The pluging currently saves credentials from interactive login in the .azure directory by default. If the user doesn't have a .azure directory, current;y the plugin hits an error. This fix checks to make sure the .azure directory exists and creates it if not.
Closes #317