Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for get and list commands when env file can't be opened #441

Merged
merged 1 commit into from Nov 25, 2022

Conversation

bbc2
Copy link
Collaborator

@bbc2 bbc2 commented Nov 12, 2022

The error message would previously be confusing. For example, dotenv -f . list would print:

Error: Invalid value: Path "." does not exist.

Instead, we now print:

Error opening env file: [Errno 21] Is a directory: '.'

I used this opportunity to slightly refactor the I/O code (e.g. fewer system calls and possible race conditions) for those two subcommands (get and list).

The error message would previously be confusing. For example, `dotenv -f
. list` would print:

    Error: Invalid value: Path "." does not exist.

Instead, we now print:

    Error opening env file: [Errno 21] Is a directory: '.'

I used this opportunity to slightly refactor the I/O code (e.g. fewer
system calls and possible race conditions) for those two subcommands
(`get` and `list`).
@bbc2 bbc2 self-assigned this Nov 12, 2022
@bbc2 bbc2 merged commit 7dc2492 into theskumar:main Nov 25, 2022
@bbc2 bbc2 deleted the cli-list-get-improve-error-msg branch November 25, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant