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

Fix(cli): don't panic when no HOME env var is set #6728

Merged
merged 6 commits into from Jul 13, 2020

Conversation

Spoonbender
Copy link
Contributor

Fix #6566

  1. Only resolve the cache dir if no $DENO_DIR is set
  2. Only resolve the home dir if no cache dir was found
  3. If the $HOME environment variable is not set, try to fetch the home directory from the system user database (passwd)

Spoonbender and others added 4 commits July 11, 2020 13:41
Ensure deno runs even if DENO_DIR or HOME environment variables are undefined
assert!(output.status.success());
}

#[cfg(not(windows))]
Copy link
Member

Choose a reason for hiding this comment

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

Why not windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right! fixed

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix @Spoonbender

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.

Deno v1.1.2 panics when no HOME env var is set
3 participants