-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.Use area-dart-cli for issues related to the 'dart' command like tool.dart-cli-runIssues related to 'dart run'Issues related to 'dart run'type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Retrieving environment declarations passed to dart run stopped working (tested on 3.10.0-49.0.dev and 3.10.0-118.0.dev). I'm assuming due to ab44b20 or related preparation work. If I pass them to the base dart CLI they do work, but I would expect them to be accepted as arguments to the run subcommand (which is documented as an option).
With a code snippet, like the following.
const bool shouldSayHello = bool.fromEnvironment('hello');
void main() {
print(shouldSayHello);
}Both the following commands print "false", when I would expect them to print "true".
dart run --define=hello=true bin/main.dart
dart run -D=hello=true bin/main.dart
If I pass them to the base dart CLI instead of the subcommand, they do print "true".
dart --define=hello=true run bin/main.dart
dart -D=hello=true run bin/main.dart
munificent
Metadata
Metadata
Assignees
Labels
area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.Use area-dart-cli for issues related to the 'dart' command like tool.dart-cli-runIssues related to 'dart run'Issues related to 'dart run'type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)