Skip to content
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

Fix undefined boolean options - Fix #988 #989

Merged
merged 1 commit into from Dec 20, 2016
Merged

Conversation

SBoudrias
Copy link
Member

Got to add and fix tests. But here's a first draft to tackle the bug.

@@ -20,6 +20,8 @@ var Storage = require('./util/storage');
var promptSuggestion = require('./util/prompt-suggestion');
var debug = require('debug')('yeoman:generator');

var EMPTY = '@@_YEOMAN_EMPTY_MARKER_@@';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s '@@_YEOMAN_EMPTY_MARKER_@@'? 😳

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need a way to detect if an explicit value was passed or not. I though of using a Symbol given it'd be a guaranteed unique value, but minimist breaks if default is not a string or a number.

So, I went with a long string that hopefully won't collide with any real value

@SBoudrias
Copy link
Member Author

SBoudrias commented Dec 20, 2016

Okay, I'll merge as is (now with regression test) to unbreak 1.0 :)

@SBoudrias SBoudrias merged commit 244c92c into master Dec 20, 2016
@SBoudrias SBoudrias deleted the fix/undefined-options branch December 20, 2016 05:27
@mischah
Copy link
Member

mischah commented Dec 20, 2016

😘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants