Skip to content

Commit

Permalink
Merge pull request #496 from desktop/node14
Browse files Browse the repository at this point in the history
Require Node 14
  • Loading branch information
niik authored Sep 5, 2022
2 parents fb4b92a + e602d0c commit 8b3ece3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
nodeVersion: [12, 14, 16, 18]
nodeVersion: [14, 16, 18]
arch: [x64]
os: [macos-11, windows-2019, ubuntu-22.04]
include:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"update-embedded-git": "node ./script/update-embedded-git.js"
},
"engines": {
"node": ">= 12"
"node": ">= 14"
},
"repository": {
"type": "git",
Expand Down
5 changes: 2 additions & 3 deletions script/download-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ProgressBar = require('progress')
const tar = require('tar')
const https = require('https')
const { createHash } = require('crypto')
const { rm, rmdir, mkdir, createReadStream, createWriteStream, existsSync } = require('fs')
const { rm, mkdir, createReadStream, createWriteStream, existsSync } = require('fs')

const config = require('./config')()

Expand Down Expand Up @@ -101,8 +101,7 @@ if (config.source === '') {
process.exit(0)
}

// Node 12 didn't have rm, only rmdir
;(rm || rmdir)(config.outputPath, { recursive: true, force: true }, error => {
rm(config.outputPath, { recursive: true, force: true }, error => {
if (error) {
console.log(`Unable to clean directory at ${config.outputPath}`, error)
process.exit(1)
Expand Down

0 comments on commit 8b3ece3

Please sign in to comment.