Skip to content

Commit

Permalink
[api] "true" and "false" values typecast to booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Feb 16, 2012
1 parent 1f9a6e5 commit 5a87769
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/commands.js
Expand Up @@ -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);
Expand Down Expand Up @@ -162,4 +172,4 @@ exports.list.usage = [
'set in the .jitsuconf file',
'',
'<app> config list'
];
];

0 comments on commit 5a87769

Please sign in to comment.