Skip to content

Update scripts lines to work on both Unix and Windows #774

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

Merged
merged 1 commit into from
Feb 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
},
"scripts": {
"check-code": [
"./vendor/bin/phpcs --standard=phpcs.xml -snp --encoding=utf-8 src/ tests/ --report-width=150"
"\"vendor/bin/phpcs\" --standard=phpcs.xml -snp --encoding=utf-8 src/ tests/ --report-width=150"
Copy link
Member

@noplanman noplanman Feb 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacklul Have you also tried it without the escaped double-quotes?
Just: "vendor/bin/phpcs ..."

I don't have a Windows machine to test on right now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Doesn't work either!

>composer check-code
> vendor/bin/phpcs --standard=phpcs.xml -snp --encoding=utf-8 src/ tests/ --report-width=150
'vendor' is not recognized as an internal or external command,
operable program or batch file.
Script vendor/bin/phpcs --standard=phpcs.xml -snp --encoding=utf-8 src/ tests/ --report-width=150 handling the check-code event returned with error code 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uff, windows... 😁

],
"test": [
"./vendor/bin/phpunit"
"\"vendor/bin/phpunit\""
],
"test-cov": [
"./vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
"\"vendor/bin/phpunit\" --coverage-clover build/logs/clover.xml"
],
"test-cov-upload": [
"wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml"
Expand Down