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

Commit

Permalink
refactor: only log missing binary error if debug is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AssetKid committed Dec 13, 2019
1 parent 1ecca38 commit 3535e36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/get-binary.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

const debug = require('debug')('youtube-dl')
const { readFileSync, existsSync } = require('fs')
const path = require('path')

Expand All @@ -8,7 +9,7 @@ const detailsPath = path.join(binPath, 'details')

module.exports = () => {
if (!existsSync(detailsPath)) {
return console.warn('WARNING: unable to locate `youtube-dl` at ' + binPath)
return debug('unable to locate `youtube-dl` at ' + binPath)
}

const details = JSON.parse(readFileSync(detailsPath))
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
"youtube"
],
"dependencies": {
"debug": "~4.1.1",
"execa": "~3.2.0",
"hh-mm-ss": "~1.2.0",
"mkdirp": "~0.5.1",
Expand Down

0 comments on commit 3535e36

Please sign in to comment.