wp-dev-lib icon indicating copy to clipboard operation
wp-dev-lib copied to clipboard

DEV_LIB_SKIP documentation

Open valendesigns opened this issue 6 years ago • 4 comments

In the docs it say to use DEV_LIB_SKIP=phpunit git commit to ignore phpunit, but that fails because the git commit portion doesn't seem accurate. Shouldn't it just be DEV_LIB_SKIP=phpunit?

valendesigns avatar Mar 11 '19 09:03 valendesigns

When you prefix a shell command with an environment variable in that way, the environment variable is set during the life of that one command and then is removed. In other words:

$ DEV_LIB_SKIP=phpunit
$ git commit
(not running phpunit)
$ echo $DEV_LIB_SKIP
phpunit

Whereas:

$ DEV_LIB_SKIP="nothing!"
$ DEV_LIB_SKIP=phpunit git commit
(still not running phpunit)
$ echo $DEV_LIB_SKIP
nothing!

Similarly, for setting NODE_ENV when running node: https://stackoverflow.com/a/9204973/93579

westonruter avatar Mar 11 '19 16:03 westonruter

That makes sense but is not clear. The context in which it’s being used is likely in the .dev-lib file not in the command line. So I could see it confusing people.

valendesigns avatar Mar 11 '19 21:03 valendesigns

The context in which it’s being used is likely in the .dev-lib file not in the command line.

@valendesigns Could you please elaborate on that? Are you saying that setting DEV_LIB_SKIP in .dev-lib doesn't work? Or should we just include an example of DEV_LIB_SKIP in the Environment Variables section of the readme?

kasparsd avatar Mar 24 '19 06:03 kasparsd

I’m suggesting we add an example somewhere for using it in the environment file because that’s the context it’s being spoken about. However, the example we show is for the command line and would confuse someone that didn’t know better.

valendesigns avatar Mar 24 '19 07:03 valendesigns