amphp / process

An async process dispatcher for Amp.
MIT License
229 stars 32 forks source link

php8 on windows with error #47

Closed haohetao closed 3 years ago

haohetao commented 3 years ago

D:\sites\git\epmms2-award>vendor\bin\grumphp.bat run GrumPHP is sniffing your code! Running tasks with priority 0!

Running task 1/5: phpcs... Running task 2/5: phpcsfixer... Running task 3/5: shell... ✘ Running task 4/5: composer... Running task 5/5: yamllint... ✔ Aborted ... ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▄███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀▀▓▓▓▓▓▓▓▓▓▓▓▓█▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████████▄ ▄███████ ██████████ ███████▀ ▀▀▀▀▀▄ ▄▀▀▀▀▀ █████ ▀ ▐████ ▐██ ▐██ ████▌ ████▌ ███ ▌██▌ ▄▄ ▄▄ ▐███ ███ ▄▄▄▄▄▄▄▄▄▄▄▄ ▐███ ██▄ ▐███████████████████████████ █▀███████████▀ ▀▀███████████ ██████████▄███████▄███████████ ▐█████████████████████████████ █████████████████████████████ ██ █████████████████████▐██▀ ▀ ▐███████████████████▌ ▐▀ ████▀████████▀▐███ ▀█▌ ▐█████ ██▌ ██▀ ▐▀

   ██████████████████████████████████
   █░░░░░░▀█▀░░░░░░▀█░░░░░░▀█▀░░░░░▀█
   █░░▐█▌░░█░░░██░░░█░░██░░░█░░░██░░█
   █░░▐█▌░░█░░░██░░░█░░██░░░█░░░██░░█
   █░░▐█▌░░█░░░██░░░█░░░░░░▄█░░▄▄▄▄▄█
   █░░▐█▌░░█░░░██░░░█░░░░████░░░░░░░█
   █░░░█░░░█▄░░░░░░▄█░░░░████▄░░░░░▄█
   ██████████████████████████████████

shell

The executable for "sh" could not be found. To skip commit checks, add -n or --no-verify flag to commit command PHP Fatal error: Uncaught TypeError: fclose(): supplied resource is not a valid stream resource in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php:221 Stack trace:

0 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(221): fclose(Resource id #530)

1 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(201): Amp\Process\Internal\Windows\Runner->free(Object(Amp\Process\Internal\Windows\Handle))

2 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Process.php(85): Amp\Process\Internal\Windows\Runner->destroy(Object(Amp\Process\Internal\Windows\Handle))

3 [internal function]: Amp\Process\Process->__destruct()

4 {main}

thrown in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php on line 221

Fatal error: Uncaught TypeError: fclose(): supplied resource is not a valid stream resource in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php:221 Stack trace:

0 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(221): fclose(Resource id #530)

1 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php(201): Amp\Process\Internal\Windows\Runner->free(Object(Amp\Process\Internal\Windows\Handle))

2 D:\sites\git\epmms2-award\vendor\amphp\process\lib\Process.php(85): Amp\Process\Internal\Windows\Runner->destroy(Object(Amp\Process\Internal\Windows\Handle))

3 [internal function]: Amp\Process\Process->__destruct()

4 {main}

thrown in D:\sites\git\epmms2-award\vendor\amphp\process\lib\Internal\Windows\Runner.php on line 221

leonardfischer commented 3 years ago

I have the same issue, but without using the 'shell' task - the error simply pops up after GrumPHP responded with "All good!".

kelunik commented 3 years ago

Please try with v1.1.1.

leonardfischer commented 3 years ago

Hey @kelunik it seems to work, I'll test with more files / tasks :)

kelunik commented 3 years ago

Alright, I'll close this then. We can reopen it if there are further issues.