Skip to content

Commit cc22661

Browse files
committed
Update node versions to match real usage, and handle node 8 issues
Production uses 10.15.1, so it'd be better to test with that, not 10.15.3. 8 is marked as technically supported, but doesn't have fs.promises. It's still mostly functional, so we'll preserve that for now, but it's very likely that future versions will drop this. In the meantime, we just avoid breaking immediately for 8.
1 parent c6eb405 commit cc22661

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ language: node_js
44
node_js:
55
- node
66
- '12'
7-
- '10.15.3'
7+
- '10.15.1'
88
- '8'
99
before_install:
1010
- sudo apt-get install p7zip-full xterm
@@ -25,7 +25,7 @@ addons:
2525
jobs:
2626
include:
2727
- stage: Build and release binaries
28-
node_js: '10.15.3'
28+
node_js: '10.15.1'
2929
echo: 'Building binaries...'
3030
script:
3131
- |

src/commands/start.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class HttpToolkitServer extends Command {
5858

5959
// On startup, we want to kill any downloaded servers that are not longer necessary
6060
async cleanupOldServers() {
61+
if (!fs) return; // In node 8, fs.promises doesn't exist, so just skip this
62+
6163
const { dataDir, version: currentVersion } = this.config;
6264

6365
const serverUpdatesPath = process.env.OCLIF_CLIENT_HOME ||

0 commit comments

Comments
 (0)