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

Conversation

jacklul
Copy link
Collaborator

@jacklul jacklul commented Feb 9, 2018

This shouldn't break anything.
Tested it in Windows command line and linux subsystem.

Currently on windows command line it doesn't seem to execute:

>composer check-code
> ./vendor/bin/phpcs --standard=phpcs.xml -snp --encoding=utf-8 src/ tests/ --report-width=150
'.' 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

@jacklul jacklul requested a review from noplanman February 9, 2018 19:49
@@ -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... 😁

@noplanman noplanman merged commit ced1a5d into php-telegram-bot:develop Feb 11, 2018
@jacklul jacklul deleted the composer_tweaks branch February 12, 2018 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants