Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More hacks to get around multiple modules being loaded

  • Loading branch information...
commit d3daa9f113e22bf2d8b142fee2a544a4329d0170 1 parent 8e4021e
@dpup authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/flags.js
View
7 lib/flags.js
@@ -11,10 +11,11 @@ var util = require('util');
* An object containing a map of flag objects. If different modules are
* importing different versions of the library we want them to use the same
* FLAGS object. This does mean that the flags library needs to be backwards
- * compatible.
+ * compatible. This is a pretty ugly solution, should look for a better one.
* @type {!Object}
*/
if (typeof GLOBAL_FLAGS == 'undefined') {
+ var registerFlags = true;
GLOBAL_FLAGS = {};
}
var FLAGS = exports.FLAGS = GLOBAL_FLAGS;
@@ -480,11 +481,9 @@ MultiStringFlag.prototype.set = function(input) {
// Internal flags
//=================
-function registerInternalFlags() {
+if (registerFlags) {
exports.defineBoolean('help').
setDescription('Shows this help text.').
setSecret(true);
// TODO: --flagsfile
}
-
-registerInternalFlags();
Please sign in to comment.
Something went wrong with that request. Please try again.