`bw --version` should ignore config file
- Dominant language
- TypeScript
- Stars
- 13.8k
- Forks
- 2k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 397
Description
### Steps To Reproduce
1. remove existing config `rm -rf ~/.config/Bitwarden CLI`
2. `bw --version`
3. observe the result
### Expected Result
I expect to see the version regardless of me having the config folder or not. This is because `--version` should be agnostic to any config, and it should not waste time on checking/creating filers and folder, nor it should clutter users's folders when it is unnecessary.
### Actual Result
```console
❯ ./bw --version
Could not find dir, "/home/mehrad/.config/Bitwarden CLI"; creating it instead.
Could not find data file, "/home/mehrad/.config/Bitwarden CLI/data.json"; creating it instead.
2022.9.0
```
### Screenshots or Videos
-- not applicable --
### Additional Context
In other words, all `--version` should do is to return the version number. it literally not do anything else other than returning that string. Any process extra is totally unnecessary, plus it would make the scripting way more challenging as `bw` does file and folder manipulation behind the scene without asking the user's consent/approval.
I literally just downloaded the binary for the first time ever and the first thing I did was to check the version through `bw --version` and to my surprise I got the messages that I posted above. Of course, I'm writing my own script to update the `bw` automatically and I want to keep one older version as a fallback, so the creation of files and folder just for checking the version seems weird.
P.s: thanks for the software, I have enjoyed the GUI and browser extension, and so far they have proven to be reliable and stable. Cheers! 🍻
### Operating System
Linux
### Operating System Version
Manjaro Linux 22.0.0
### Shell
Zsh
### Build Version
2022.9.0
Contributor guide
Research direction
Start at the CLI entry point that handles `bw --version`, then trace when configuration directories and files are initialized. Verify the version command returns only the version and does not create or inspect the config directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100