Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
refactor: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Aug 10, 2019
1 parent 1125b0e commit 5e2cc08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/get-binary.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
'use strict'

const { readFileSync, existsSync } = require('fs')
const path = require('path')
const fs = require('fs')

const binPath = path.join(__dirname, '..', 'bin')
const detailsPath = path.join(binPath, 'details')

module.exports = () => {
if (!fs.existsSync(detailsPath)) {
if (!existsSync(detailsPath)) {
throw new Error('ERROR: unable to locate `youtube-dl` at ' + binPath)
}

const details = JSON.parse(fs.readFileSync(detailsPath))
const details = JSON.parse(readFileSync(detailsPath))

return details.path
? details.path
Expand Down
2 changes: 1 addition & 1 deletion lib/youtube-dl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const execFile = require('child_process').execFile
const { execFile } = require('child_process')
const streamify = require('streamify')
const request = require('request')
const hms = require('hh-mm-ss')
Expand Down

0 comments on commit 5e2cc08

Please sign in to comment.