Skip to content

Commit 1ea9647

Browse files
committed
Solving error launched running command gtt config when neither EDITOR nor VISUAL environnement variables are set
1 parent c4692a5 commit 1ea9647

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/include/filesystem.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class filesystem {
2525
static open(file) {
2626
let editor = process.env.VISUAL;
2727

28-
if (editor || (editor = process.env.EDITOR)) {
29-
return child_process.spawn(editor, [file], {
30-
stdio: 'inherit'
31-
});
32-
} else {
33-
return open(file);
28+
if (!editor && !(editor = process.env.EDITOR)) {
29+
editor = "vi";
3430
}
31+
32+
return child_process.spawn(editor, [file], {
33+
stdio: 'inherit'
34+
});
3535
}
3636

3737
static join(...args) {

0 commit comments

Comments
 (0)