-
Notifications
You must be signed in to change notification settings - Fork 232
Pub commands crash when $HOME is not set #3167
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
Comments
I believe that this is because of #3092 which relies on the $HOME environment variable to determine where to store config details on Linux and unknown operating systems. |
Not being very familiar with Fuschia, Is there any good location for putting app-specific configuration?, then platform specific logic for that could be integrated into the code (that now lives here: https://github.com/dart-lang/cli_util/blob/master/lib/cli_util.dart#L87) feel free to answer here or just making a PR. |
@sigurdm Fuchsia isn't really the issue here (note that this issue does not mention Fuchsia). The issue is that we have tools that run Can you talk in more detail about why every command requires the TokenStore to work? |
For a But I agree, if we cannot find a config-dir we should just truck on without any tokens instead of crashing :) . I think we simply did not consider the environment without a $HOME folder valid when designing this - but I guess for some hermetic environments it would be. FWIW a posix environment must have a
That of course does not limit you from unsetting it later or running dart in a non-posix environment. The only solution I see right now is changing the type of https://github.com/dart-lang/cli_util/blob/master/lib/cli_util.dart#L87 @jonasfj will be with us next week - maybe he has some insight. |
I agree, I think we just didn't imagine an environment without |
Environment
pub version
orflutter pub version
: Dart SDK version: 2.15.0-edge.e08ee7abecd889a55bee49afe635ea620b28b93e (be) (Wed Sep 15 00:43:22 2021 +0000) on "linux_x64"Problem
You can make
pub
crash by unsetting the $HOME variable. This breaks tools that runpub
in a clean environment without any environment variables. Example repro instructionsExpected behavior
pub
does not crash.Actual behavior
The text was updated successfully, but these errors were encountered: