Skip to content

Dart:io does not run path commands on macOS #38364

Open
@faridg18

Description

I am making a CLI project with dart using dart io to run flutter command, but process throws the following error when trying to run flutter only on macOS

Unhandled exception:
ProcessException: No such file or directory
Command: flutter doctor
#0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:496:7)
#1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:641:18)
#2 Process.runSync (dart:io-patch/process_patch.dart:66:12)
#3 File.initProject (package:real_product/package/entities/file.dart:45:20)
#4 main (package:real_product/main.dart:46:11)
#5 _startIsolate. (dart:isolate-patch/isolate_patch.dart:303:32)
#6 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

I have flutter on my path and I am able to run commands from the terminal. the weird thing is that it works perfectly on linux.

here is my flutter doctor output from the terminal.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.38.1)
[!] Connected device
! No devices available

! Doctor found issues in 1 category.

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-io

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions