login fails if ~/.aws/credentials is a directory instead of a file
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
The extension crashing instantly.
I removed the extension, reloaded the IDE, reinstalled the extension.
the error remains.
```bash
2023-08-13 10:35:34 [ERROR]: log level: info
2023-08-13 10:35:34 [INFO]: endpoints: retrieving AWS endpoints data
2023-08-13 10:35:34 [INFO]: OS: Darwin arm64 22.5.0
2023-08-13 10:35:34 [INFO]: Visual Studio Code extension host: 1.81.1
2023-08-13 10:35:34 [INFO]: AWS Toolkit: 1.84.0
2023-08-13 10:35:34 [INFO]: node: 16.17.1
2023-08-13 10:35:34 [INFO]: electron: 22.3.18
2023-08-13 10:36:54 [ERROR]: aws.login: EntryIsADirectory (FileSystemError): Error: EISDIR: illegal operation on a directory, read [FileIsADirectory]
2023-08-13 10:39:28 [ERROR]: aws.login: EntryIsADirectory (FileSystemError): Error: EISDIR: illegal operation on a directory, read [FileIsADirectory]
2023-08-13 10:40:35 [INFO]: telemetry: sent batch (size=10)
```
## Steps to reproduce the issue
1. install the extension.
2. Login to AWS using `aws sso login` command
3. click on the red bar at where it's saying `AWS: profile: default` to use the newly created credentials.
4. see the error pop-up.
5. review the logs.


## Expected behavior
The extension should work
## System details (run the `AWS: About Toolkit` command)
- OS: Darwin arm64 22.5.0
- Visual Studio Code extension host: 1.81.1
- AWS Toolkit: 1.84.0
- node: 16.17.1
- electron: 22.3.18
Contributor guide
Research direction
Start with the aws.login flow and reproduce the reported steps with ~/.aws/credentials configured as a directory, using the logged EISDIR error as the symptom. Confirm the extension no longer crashes during AWS login and handles this filesystem condition in a usable way.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- authentication, cloud, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100