This repository has been archived by the owner on Jan 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
composer scripts is not compatible with windows #450
Comments
Why? Can you explain the issue you encountered? What operating system were you using? |
nm, I see you're on Windows. Still would like to know what error you encountered - the quoting should work cross-platform generally. |
Hello,
if you try to send in cmd.exe a commadline insidfe single quotes you will get an error.
php -r 'echo "abc";'
PHP Parse error: syntax error, unexpected ''echo' (T_ENCAPSED_AND_WHITESPACE), expecting end of file in Command line code on line 1
Parse error: syntax error, unexpected ''echo' (T_ENCAPSED_AND_WHITESPACE), expecting end of file in Command line code on line 1
Without error::::
php -r "echo 'abc';"
abc
or:
php -r "echo \"abc\";"
abc
regards
Andreas
Von: weierophinney
Gesendet: Donnerstag, 21. November 2019 15:48
An: zendframework/ZendSkeletonApplication <ZendSkeletonApplication@noreply.github.com>
Cc: AndyP1965 <andreas.paulick@gmx.de>; Author <author@noreply.github.com>
Betreff: Re: [zendframework/ZendSkeletonApplication] composer scripts is not compatible with windows (#450)
Why? Can you explain the issue you encountered? What operating system were you using?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#450?email_source=notifications&email_token=AN2ZZKFAN2JKI4I7JOEAHX3QU2NR5A5CNFSM4JQDIRI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2PAEY#issuecomment-557117459> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AN2ZZKE6ECH5G7ROT2BWLZDQU2NR5ANCNFSM4JQDIRIQ> . <https://github.com/notifications/beacon/AN2ZZKEV3DIPIF6XJ4JHLW3QU2NR5A5CNFSM4JQDIRI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2PAEY.gif>
|
Hello weierophinney
It works fine für Windows OS but i guess for Linux wont works now because command line is not compatible for bash replacment. ☹
"shell" : "php -r '$file = file_get_contents(\".gitignore\"); $file = str_replace(\"composer.lock\", \"\", $file); file_put_contents(\".gitignore\", $file);'",
"cmd" : "php -r \"$file = file_get_contents('.gitignore'); $file = str_replace('composer.lock', '', $file); file_put_contents('.gitignore', $file);\""
or use an external php file with php -f ...... ( compatible to both )
regards
Andreas
Von: weierophinney
Gesendet: Donnerstag, 21. November 2019 22:06
An: zendframework/ZendSkeletonApplication <ZendSkeletonApplication@noreply.github.com>
Cc: AndyP1965 <andreas.paulick@gmx.de>; Author <author@noreply.github.com>
Betreff: Re: [zendframework/ZendSkeletonApplication] composer scripts is not compatible with windows (#450)
Closed #450 <#450> via #451 <#451> .
—
You are receiving this because you authored the thread.
Reply to this email directly, <#450?email_source=notifications&email_token=AN2ZZKF3LO2BHFDMXXT6KCDQU3Z3FA5CNFSM4JQDIRI2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVATY5LA#event-2821164716> view it on GitHub, or <https://github.com/notifications/unsubscribe-auth/AN2ZZKAHFS5QKYZ36KHU73DQU3Z3FANCNFSM4JQDIRIQ> unsubscribe. <https://github.com/notifications/beacon/AN2ZZKDXEMJZX3TEK4ARQJDQU3Z3FA5CNFSM4JQDIRI2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVATY5LA.gif>
|
@AndyP1965 Just confirmed on Linux. Will try to get another option in place shortly. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
composer.json:
in "scripts": { "post-create-project-cmd": [...] }
please change double quoting to single quoting in the line:
"php -r "$file = file_get_contents('.gitignore'); $file = str_replace('composer.lock', '', $file); file_put_contents('.gitignore', $file);""
The text was updated successfully, but these errors were encountered: