Skip to content
Browse files

[api] "true" and "false" values typecast to booleans

  • Loading branch information...
1 parent 1f9a6e5 commit ea10784492418cc6e85f7a7b1a6ba4ac0547edee @jfhbrook jfhbrook committed Feb 16, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 lib/commands.js
View
12 lib/commands.js
@@ -35,6 +35,16 @@ exports.set = function (key, value, callback) {
else if (cliConfig.before.set && !cliConfig.before.set(key, value)) {
return callback();
}
+
+ //
+ // This should allow users to set booleans.
+ //
+ if (value === "true") {
+ value = true;
+ }
+ if (value === "false") {
+ value = false;
+ }
cliConfig.app.config.set(key, value);
cliConfig.app.config.save(callback);
@@ -162,4 +172,4 @@ exports.list.usage = [
'set in the .jitsuconf file',
'',
'<app> config list'
-];
+];

0 comments on commit ea10784

Please sign in to comment.
Something went wrong with that request. Please try again.