-
Notifications
You must be signed in to change notification settings - Fork 38
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
Avoid setting undefined options #41
base: master
Are you sure you want to change the base?
Conversation
@@ -29,6 +29,7 @@ | |||
}, | |||
"devDependencies": { | |||
"grunt": "~0.4.5", | |||
"grunt-cli": "~1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm test
only works if grunt-cli is a global install. This fixes that.
@jsoverson any thoughts on this? |
@evanshortiss certainly seems reasonable. Are you interested in adopting this project? I haven't been maintaining it for a very long time and would be glad to pass it on to someone who is still using it. |
I don't have many changes to make at present, but would certainly be happy to be a maintainer since we use it frequently on projects and might find new use cases to support 👍 |
@jsoverson just a reminder on this one when you have the time |
Ran into this bug in my own code. Basically I have two variations of a grunt task. One simulates a local environment, the other a DEV environment. In DEV and beyond an env var will be set, but in local it will not be set since it is generated by a platform I deploy my code on. This means I have this:
The issue arises here when
undefined
is returned. Doingprocess.env.DEFINED_BASED_ON_ENV = undefined
, works, but when we get it later it's a String like"undefined"
since node.js seems to change it when being set! For example this check would pass:I made this PR since it works around this issue by allowing us to circumvent setting vars in certain configurations. We could have two options, e.g
env.local
andenv.dev
, but would be nice to avoid this pitfall in general.