feature(cloudcmd) add ability to override editor with CLOUDCMD_EDITOR environment variable

This commit is contained in:
coderaiser 2017-05-07 23:39:37 +03:00
parent c71d087695
commit 958973b57c
3 changed files with 7 additions and 1 deletions

View file

@ -329,6 +329,7 @@ Here is description of options:
Some config options can be overridden with `environment variables` such:
- `CLOUDCMD_EDITOR` - set editor
- `CLOUDCMD_TERMINAL` - enable terminal
- `CLOUDCMD_TERMINAL_PATH` - set terminal path
- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog

View file

@ -17,6 +17,11 @@
"value": "false",
"required": false
},
"CLOUDCMD_EDITOR": {
"description": "set editor",
"value": "edward",
"required": false
},
"CLOUDCMD_TERMINAL": {
"description": "enable terminal",
"value": "true",

View file

@ -51,7 +51,7 @@ const args = require('minimist')(argv.slice(2), {
minify : config('minify'),
online : config('online'),
open : config('open'),
editor : config('editor') || 'edward',
editor : choose(env('editor'), config('editor')) || 'edward',
packer : config('packer') || 'tar',
zip : config('zip'),
username : config('username'),