PHPStorm: How to setup running terminal commands instead of trying open it

假装没事ソ 提交于 2019-12-13 04:45:14

问题


lately I start to learning Laravel using PHPStorm.

Anyway I set up composer and all that stuff, but still have problem with one very annoying issue.

Every time I type "composer update" or something similar that need to fire few commands "from under the hood" I receive popup saying: "Cannot find file" "/Application/.../optimize" - as an example of php artisan optimize

It's the same for all commands that's in composer.json file:

(...)
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
(...)

Which I need to run by myself. And funny thing - when I type "php artisan optimize" I get (before I get massages as above):

Please help me to set PHPStorm working correctly.

来源:https://stackoverflow.com/questions/32504649/phpstorm-how-to-setup-running-terminal-commands-instead-of-trying-open-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!