Skip to content

dart migrate should depend on dart pub, not pub.bat #42343

@mit-mit

Description

@mit-mit

Currently dart migrate tries to invoke pub.bat:

C:\Users\mit\tmp\foobar>dart migrate
CreateProcessW failed 2
ProcessException: The system cannot find the file specified.

  Command: "C:\Program Files\Dart\dart-sdk\bin\pub.bat" outdated --mode=null-safety --json

Also, it refers to pub.bat in it's user facing output:
https://github.com/dart-lang/sdk/blob/master/pkg/nnbd_migration/lib/migration_cli.dart#L159

This is not a good idead for Flutter users who are using the embedded Dart SDK. They will have the flutter and dart commands in path, but no pub command. It would be better to depend on, and direct users towards, using the dart pub command, which they will have available.

Metadata

Metadata

Assignees

Labels

area-migration (deprecated)Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions