Skip to content
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

Process.run can't run batch files on windows without extensions #31291

Open
lexaknyazev opened this issue Nov 7, 2017 · 2 comments
Open

Process.run can't run batch files on windows without extensions #31291

lexaknyazev opened this issue Nov 7, 2017 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug

Comments

@lexaknyazev
Copy link
Contributor

Dart VM version: 2.0.0-dev.6.0 (Thu Nov 02 09:04:29 2017) on "windows_x64"

With extension

import 'dart:io';

main(List<String> arguments) {
  print(Process.runSync('pub.bat', ['help']).stdout);
}
Pub is a package manager for Dart.
...

Without extension

import 'dart:io';

main(List<String> arguments) {
  print(Process.runSync('pub', ['help']).stdout);
}
Unhandled exception:
ProcessException: The system cannot find the file specified.
@a-siva a-siva added type-enhancement A request for a change that isn't a bug area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Nov 9, 2017
@liudonghua123
Copy link

I have the same issue, I want to build and run dart-pad/dart-services, Firstly I got vulcanize command not found issue, I changed to vulcanize.cmd then it worked, and during the running, I got ProcessException: The system cannot find the file specified. Command: D:\apps\Dart\dart-sdk\bin\dart2js, I need to find and change dart2js to dart2js.bat.

I think Process.run/Process.runSync should consider the PATHEXT environment. And run without executable extension.

@jibbers42
Copy link

This affects flutterfire_cli's update command as it currently fails on Windows with "ProcessException: The system cannot find the file specified."
invertase/flutterfire_cli#252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants