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

refactor: remove cwd pre-check #276

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

ComradeVanti
Copy link
Collaborator

Currently, we check if cwd exists during parseEnv. This is not really necessary, because all operations which use cwd will also check if the path exist or handle missing files accordingly.

We can thus safely remove this check. This comes with two slight changes in behavior:

  • The app fails later if cwd is not found. Instead of the app failing immediately during start-up, will will only fail once cwd is actually required/used.
  • There was a error-log in parseEnv which notified of the missing path. This log is now removed.

Currently, we check if cwd exists during `parseEnv`. This is not really necessary, because all operations which use cwd will also check if the path exist or handle missing files accordingly.

We can thus safely remove this check. This comes with two slight changes in behavior:

- The app fails later if cwd is not found. Instead of the app failing immediately during start-up, will will only fail once cwd is actually required.
- There was a error-log in `parseEnv` which notified of the missing path. This log is now removed.
Copy link
Member

@favoyang favoyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart move.

@ComradeVanti ComradeVanti merged commit 52f988d into master Apr 24, 2024
4 checks passed
@ComradeVanti ComradeVanti deleted the remove-redudant-error branch April 24, 2024 09:38
github-actions bot pushed a commit that referenced this pull request Apr 24, 2024
## [1.23.1](1.23.0...1.23.1) (2024-04-24)

### Bug Fixes

* remove cwd pre-check ([#276](#276)) ([52f988d](52f988d))
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

2 participants