-
Notifications
You must be signed in to change notification settings - Fork 192
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
sculpin fails to run from vendor/bin directory after a composer install #318
Comments
…ctory if installed via composer
I have a similar issue, not sure if it is related, with sculpin failing to run after composer install. Execute: Returns: Note this is being attempted on Windows. |
you have to add php in front of that command, but that will most likely lead to another problem on Windows, which I have. php vendor/bin/sculpin generate --watch --server The problem immediately after running above: dir=$(d=${0%[/\\]*}; cd "$d"; cd "../sculpin/sculpin/bin" && pwd)
# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
# Cygwin paths start with /cygdrive/ which will break windows PHP,
# so we need to translate the dir path to windows format. However
# we could be using cygwin PHP which does not require this, so we
# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
if [[ $(which php) == /cygdrive/* ]]; then
dir=$(cygpath -m "$dir");
fi
fi
dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/sculpin" "$@"
|
Just create your own bootstrap file sculpin.php in your root folder, and place following code
and now you can call it like
On Win, paths are built like C:\WIN\PATH (not Unix style), and also, at that point, the path is actually the correct one. Just modify it like this:
It worked for me. I did not get into details exactly where and why this happens, but it should work. NOTE: This is just a quick fix, NOT the real deal. @edwardhew @j-danner |
Hi! I had all the same issues described here. And last fix with |
It's because I am lazy. |
The fix worked for me right away. |
This should be workable in the most recent |
Error described in title.
The text was updated successfully, but these errors were encountered: