fzyzcjy / dart_interactive

REPL (interactive shell) for Dart, supporting 3rd party packages, hot reload, and full grammar
https://github.com/fzyzcjy/dart_interactive
MIT License
221 stars 13 forks source link

🐛 Bug: `[STDERR] The system cannot find the path specified` on Windows 11 #67

Closed coder0107git closed 1 year ago

coder0107git commented 1 year ago

Description

Running shell commands in the interactive console produces the errors [STDERR] The system cannot find the path specified and [WARNING <date>] Process execution failed (exitCode=1).

Steps to reproduce the behavior:

  1. Install the package if not already installed (make sure the install location is on your path and using the latest version).
  2. Start the package.
  3. Run !dart pub add device_info_plus or !dart pub add path.
  4. See the error

Expected behavior

The package to install and work like normal.

Screenshots

Git Bash: ![git-bash-dart-interactive-error](https://user-images.githubusercontent.com/76132013/211135194-1fabbae8-3a2f-4bed-8b2f-f2b4ce75a7dc.png) PowerShell: ![powershell-dart-interactive-error](https://user-images.githubusercontent.com/76132013/211135297-28a18571-4e21-4ca9-bfbf-98f5be684014.png) Command Prompt: ![command-prompt-dart-interactive-error](https://user-images.githubusercontent.com/76132013/211170669-7e6dc85c-4695-41bb-999d-4adceea47907.png)

Desktop:

welcome[bot] commented 1 year ago

Hi! Thanks for opening your first issue here! :smile:

fzyzcjy commented 1 year ago

Hmm looks like cannot find the dart command?

coder0107git commented 1 year ago

The odd thing is I have the dart command in my path. I checked by running dart --version in Git Bash, PowerShell, and Command Prompt (all produced the same result, Dart SDK version: 2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "windows_x64").

fzyzcjy commented 1 year ago

Feel free to debug by, e.g. downloading source code and dart run and print out some logs! I guess it may be caused by how dart's execute-process command different from normal

coder0107git commented 1 year ago

I git cloned the repo, ran dart pub get in dart_interactive/packages/interactive, and ran dart run --verbosity=all in the same folder. I got the same errors (even when I ran !whoami).

fzyzcjy commented 1 year ago

Yes, that's why I guess it is a problem of Dart Process class

coder0107git commented 1 year ago

I'm not sure I understand. Is it a problem with my dart install or this package?

fzyzcjy commented 1 year ago

Maybe a problem of how this package incorrectly(?) uses the DartProcess. Thus, I would suggest creating a minimal reproducible sample, such as a bare metal dart file with a few lines calling a process like whoami as you have said, and see what happens.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.