-
Notifications
You must be signed in to change notification settings - Fork 210
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
Cannot access environment on dart test #1794
Comments
Should work according to #1509, but indeed does not work. Must be a regression. /cc @bkonyi @natebosch |
It seems it doesn't pick up any environment variables, either. |
You can get back to the old behavior with the flag With the new strategy we might need to build support for parsing the arguments as passed to the test runner. If we did that we'd probably want it to be general and work for dart2js tests as well. cc @jakemac53 |
Confirmed on my machine that It still doesn't pick up any environment variables, though. So If I do MY_VAR=true import 'dart:io' show Platform;
void main() {
print(Platform.environment['MY_VAR']);
}
|
I can't repro. Either strategy picks up the environment for me. Are you confident that the environment for the |
My bad, I didn't export the env var. After I did, it works. |
I don't see this as a high priority feature personally, and adding |
dart -Dblah=true test
outputs:It seems like the environment does not exist when you run
dart test
Dart SDK 2.18.4
The text was updated successfully, but these errors were encountered: