From 233741968abd2a3ba870aa71a908e8afb7270e79 Mon Sep 17 00:00:00 2001 From: Michael Williams Date: Thu, 6 Dec 2018 12:50:01 +1300 Subject: [PATCH] allow overriding strip command for cross-compilation --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e2e4675..3d3171b 100644 --- a/index.js +++ b/index.js @@ -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))