mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
feature(env) return boolean only
This commit is contained in:
parent
4e99372e6f
commit
9c18764178
2 changed files with 2 additions and 5 deletions
|
|
@ -153,7 +153,7 @@ function main() {
|
|||
config('onePanelMode', false);
|
||||
}
|
||||
|
||||
if (typeof env.bool('one_panel_mode') === 'boolean') {
|
||||
if (env('one_panel_mode')) {
|
||||
util.deprecate(noop, `CLOUDCMD_ONE_PANEL_MODE deprecated, use CLOUDCMD_ONE_FILE_PANEL instead`, 'DP0001')();
|
||||
config('oneFilePanel', env.bool('one_panel_mode'));
|
||||
config('onePanelMode', env.bool('one_panel_mode'));
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ module.exports.bool = (name) => {
|
|||
if (value === 'true')
|
||||
return true;
|
||||
|
||||
if (value === 'false')
|
||||
return false;
|
||||
|
||||
return value;
|
||||
return false;
|
||||
};
|
||||
|
||||
function parse(name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue