Skip to content

Commit 958973b

Browse files
committed
feature(cloudcmd) add ability to override editor with CLOUDCMD_EDITOR environment variable
1 parent c71d087 commit 958973b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

HELP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ Here is description of options:
329329

330330
Some config options can be overridden with `environment variables` such:
331331

332+
- `CLOUDCMD_EDITOR` - set editor
332333
- `CLOUDCMD_TERMINAL` - enable terminal
333334
- `CLOUDCMD_TERMINAL_PATH` - set terminal path
334335
- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog

app.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"value": "false",
1818
"required": false
1919
},
20+
"CLOUDCMD_EDITOR": {
21+
"description": "set editor",
22+
"value": "edward",
23+
"required": false
24+
},
2025
"CLOUDCMD_TERMINAL": {
2126
"description": "enable terminal",
2227
"value": "true",

bin/cloudcmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const args = require('minimist')(argv.slice(2), {
5151
minify : config('minify'),
5252
online : config('online'),
5353
open : config('open'),
54-
editor : config('editor') || 'edward',
54+
editor : choose(env('editor'), config('editor')) || 'edward',
5555
packer : config('packer') || 'tar',
5656
zip : config('zip'),
5757
username : config('username'),

0 commit comments

Comments
 (0)