Larastan: Doesn't run on Laravel Homestead (on Windows)

Created on 18 Jul 2018  路  4Comments  路  Source: nunomaduro/larastan

When running the command php artisan code:analyse in Putty (SSH'ed into Laravel Homestead) I'm returned with this..

vagrant@homestead:~/project$ php artisan code:analyse

dir=$(cd "${0%[/\\]*}" > /dev/null; cd '../phpstan/phpstan/bin' && pwd)

if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
   # We are in Cgywin using Windows php, so the path must be translated
   dir=$(cygpath -m "$dir");
fi

"${dir}/phpstan" "$@"
vagrant@homestead:~/project$ 

Seems related to #7 however I just installed larastan fresh.

windows bug

Most helpful comment

I think I can send a PR for this one tonight as I've fixed this exact same error before on Laravel Dusk.

All 4 comments

Having the same issue as @Braunson
Running php artisan code:analyse gives the same output as above.
Fresh Larastan install into an existing Laravel project.
On Windows 10, in Homestead using VirtualBox. SSH'ed via the command line.

I think I can send a PR for this one tonight as I've fixed this exact same error before on Laravel Dusk.

Fixed by @deleugpn on the PR https://github.com/nunomaduro/larastan/pull/55. And @ForzaSFerrari have confirmed that is working now using Laravel Homestead (on Windows).

Thanks @deleugpn ! Great work! 馃憦

Was this page helpful?
0 / 5 - 0 ratings