Skip to content

Commit

Permalink
allow overriding strip command for cross-compilation (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahdinosaur authored and mafintosh committed Jan 21, 2019
1 parent cde8800 commit 43d8d2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ function strip (file, opts, cb) {
if (!opts.strip || (opts.platform !== 'darwin' && opts.platform !== 'linux')) return cb()

var args = opts.platform === 'darwin' ? [file, '-Sx'] : [file, '--strip-all']
var child = proc.spawn('strip', args, {stdio: 'ignore'})
var stripBin = process.env.STRIP || 'strip'
var child = proc.spawn(stripBin, args, { stdio: 'ignore'})

child.on('exit', function (code) {
if (code) return cb(spawnError('strip', code))
Expand Down

0 comments on commit 43d8d2c

Please sign in to comment.