ericclemmons / if-env

Simplify npm scripts with `if-env ... && npm run this || npm run that`
MIT License
97 stars 14 forks source link

Does not work with bash scripts? #7

Open patmuk opened 7 years ago

patmuk commented 7 years ago

The only difference from the example I see is not using nom run (and setting the env value) in: "test" : "NODE_ENV='production' && if-env NODE_ENV==production && echo 'prod' $NODE_ENV || echo 'dev' $NODE_ENV",

The output I get (in Mac OS Sierra): dev production

Do I use it wrongly or did I met a limitation?

anitharajagopal commented 5 years ago

I am facing the same issue, if condition is never satisfied, not sure why. @patmuk looks like this issue was reported more than a year now. Did it get resolved for you? if this doesnt work, I have to think of other option other than if-env