Using --define
is not consistent across dart CLI commands
#51791
Labels
area-dart-cli
Use area-dart-cli for issues related to the 'dart' command like tool.
dart-cli-test
Issues related to the 'dart test' tool
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
it picks up the correct value of the var, but if I do the same with the test command it fails
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.
The text was updated successfully, but these errors were encountered: