Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use open 7.0.4 to fix issue
better to use this as vi may not be available on windows
  • Loading branch information
cgdobre committed Jul 1, 2020
commit e4fd554e304db138c2b48e93d269cf7691118b4e
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
node_js:
- "6"
- "6.11"
- "8"
- "10"
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"gtt": "src/gtt.js"
},
"engines": {
"node": ">=6.11"
"node": ">=8"
},
"pkg": {
"scripts": "src/**/*.js",
Expand Down Expand Up @@ -49,7 +49,7 @@
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
"node-spinner": "^0.0.4",
"open": "^0.0.5",
"open": "^7.0.4",
"progress": "^2.0.0",
"prompt": "^1.0.0",
"read-yaml": "^1.1.0",
Expand Down
8 changes: 6 additions & 2 deletions src/include/filesystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ class filesystem {
static open(file) {
let editor = process.env.VISUAL;

if (!editor && !(editor = process.env.EDITOR)) {
editor = "vi";
if (editor || (editor = process.env.EDITOR)) {
return child_process.spawn(editor, [file], {
stdio: 'inherit'
});
} else {
return (async () => await open(file))().catch(e => console.error(e));
}

return child_process.spawn(editor, [file], {
Expand Down
22 changes: 19 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,11 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2:
is-data-descriptor "^1.0.0"
kind-of "^6.0.2"

is-docker@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b"
integrity sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==

is-extendable@^0.1.0, is-extendable@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
Expand Down Expand Up @@ -1274,6 +1279,13 @@ is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"

is-wsl@^2.1.1:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
dependencies:
is-docker "^2.0.0"

[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
Expand Down Expand Up @@ -1720,9 +1732,13 @@ onetime@^2.0.0:
dependencies:
mimic-fn "^1.0.0"

open@^0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/open/-/open-0.0.5.tgz#42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc"
open@^7.0.4:
version "7.0.4"
resolved "https://registry.yarnpkg.com/open/-/open-7.0.4.tgz#c28a9d315e5c98340bf979fdcb2e58664aa10d83"
integrity sha512-brSA+/yq+b08Hsr4c8fsEW2CRzk1BmfN3SAK/5VCHQ9bdoZJ4qa/+AfR0xHjlbbZUyPkUHs1b8x1RqdyZdkVqQ==
dependencies:
is-docker "^2.0.0"
is-wsl "^2.1.1"

optimist@^0.6.1:
version "0.6.1"
Expand Down