Open
Description
Hey,
I'm developing a dart package that has some integration tests dependent on an outside service and I use the String.fromEnvironment
method to get the value of a specific variable and not have it in the repository as code.
The thing is that the flag that adds environment variables doesn't seem to work consistently across dart CLI commands.
If I run the command
dart -DMY_VAR=my-value run some-dart-test.dart
it picks up the correct value of the var, but if I do the same with the test command it fails
dart -DMY_VAR=my-value test
Also the define
flag doesn't seem to be documented anywhere in the CLI. I got a hold of how it works through stackoverflow entries and I don't know if I'm doing something wrong.
I'm using dart 2.19.4 on a Windows 10 machine.