Skip to content
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

Specify path for scripts #6

Open
RobLoach opened this issue May 4, 2015 · 3 comments
Open

Specify path for scripts #6

RobLoach opened this issue May 4, 2015 · 3 comments

Comments

@RobLoach
Copy link

RobLoach commented May 4, 2015

This would add the directories specified in "path" to PATH, allowing scripts to not need the bin/ prefix.

extensions:
    PhpZone\Shell\Shell:
        tests:
            description: Run all tests
            script:
                - behat -f progress
                - phpunit
                - phpspec run -f progress
                - phpcs -p --colors --standard=PSR2 src/ features/bootstrap/
                - phpcs -p --colors --standard=vendor/jakubzapletal/php_codesniffer-rules/psr2-without-camel-case-method-name.xml spec/ integrations/
            path:
                - bin
@jakubzapletal
Copy link
Member

Good point. There are 2 things to discuss:

  • path could be only a string, not an array. Is there any reason why this is an array?
  • Let's somebody has a sub-command like sudo phpunit or whatever doesn't have the required app in the beginning. How would you handle this?

@RobLoach
Copy link
Author

RobLoach commented May 5, 2015

path could be only a string, not an array. Is there any reason why this is an array?

Agreed. Maybe you want to add multiple paths? It definitely should still allow for path: bin.

Let's somebody has a sub-command like sudo phpunit or whatever doesn't have the required app in the beginning. How would you handle this?

Hmmm? Could you describe a use case? I'd assume for sudo phpunit, they'd rather run it through sudo phpzone tests. Thoughts?

@jakubzapletal
Copy link
Member

You are right, it was the bad example :-)

So there is a better example: php -d xdebug.max_nesting_level=255 vendor/bin/behat
or another example is when you would like to use EXPORT. I believe there could be more examples.

I like your improvement, I'm just thinking what could be wrong and how to solve it.

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

No branches or pull requests

2 participants