Skip to content

Commit

Permalink
refactor: use @malept/cross-spawn-promise instead of the indirect exp…
Browse files Browse the repository at this point in the history
…ort (#68)
  • Loading branch information
malept authored Feb 14, 2020
1 parent 6961280 commit 2f76307
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
"sinon": "^8.0.4"
},
"dependencies": {
"@malept/cross-spawn-promise": "^1.0.0",
"debug": "^4.1.1",
"electron-installer-common": "^0.10.0",
"electron-installer-common": "^0.10.1",
"fs-extra": "^8.0.1",
"js-yaml": "^3.10.0",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion src/snapcraft.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

const debug = require('debug')('electron-installer-snap:snapcraft')
const { spawn } = require('electron-installer-common')
const { spawn } = require('@malept/cross-spawn-promise')
const which = require('which')

class Snapcraft {
Expand Down
5 changes: 3 additions & 2 deletions src/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const fs = require('fs-extra')
const { merge, pull } = require('lodash')
const path = require('path')
const semver = require('semver')
const { spawn } = require('@malept/cross-spawn-promise')
const which = require('which')
const yaml = require('js-yaml')

Expand Down Expand Up @@ -100,9 +101,9 @@ class SnapcraftYAML {
}

async detectDistro (lsbRelease) {
const output = await common.spawn(lsbRelease, ['--short', '--id', '--release'])
const output = await spawn(lsbRelease, ['--short', '--id', '--release'])
if (output) {
return output.toString().trim().split('\n')
return output.trim().split('\n')
}

return [null, null]
Expand Down

0 comments on commit 2f76307

Please sign in to comment.