Skip to content

Commit b76ae4e

Browse files
authored
Updated README.md regarding adding standards only in dev
The post-(install|update)-cmd should be only executed when we are in dev mode of composer. There is an environment variable definded ($COMPOSER_DEV_MODE) for this.
1 parent f7de26f commit b76ae4e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ Due to security, when installed this way the Magento standard for phpcs cannot b
1111
You can achieve this by adding the following to your project's `composer.json`:
1212
````
1313
"scripts": {
14-
"post-install-cmd": "vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/",
15-
"post-update-cmd": "vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/"
14+
"post-install-cmd": [
15+
"[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/"
16+
],
17+
"post-update-cmd": [
18+
"[ $COMPOSER_DEV_MODE -eq 1 ] && vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/"
19+
]
1620
}
1721
````
1822

0 commit comments

Comments
 (0)