strip command output for multiple files incorrect in 8.2.0
dhritzkiv opened this issue · comments
As of v8.2.0, the --strip
option no longer generates a valid strip(1) output:
strip build/Release/webgl.node,build/Release/obj.target/webgl.node --strip-all
which results in No such file
.
Before (in v8.1.2), I believe the output was simply either one of:
# it may only be stripping the first file
strip build/Release/webgl.node --strip-all
or
# note the space
strip build/Release/webgl.node build/Release/obj.target/webgl.node --strip-all
Both of which ultimately run successfully. I'm can't confirm what the actual strip
command output is, however.
I tested v8.1.2 and it works as expected.
This may be the result of the switch to recursive-readdir
Line 3 in 3b8401d
Yes, it's the first case ("it may only be stripping the first file").
This may be the result of the switch to recursive-readdir
Correct, and apologies for the breaking change. Before 8.2.0, files in nested folders were not included. The default include regex is \.node$
, which before only matched 1 file in your case, now 2.
There are 2 problems to solve here:
- Should we not scan nested folders by default? Or tweak the default regex to only include top-level
.node
files? I'm not sure how to best satisfy everyone's needs. cc @zaro - Fix stripping to correctly handle multiple files.
about 1. I think either solution is fine. I would personally go for the regex limiting to only top-level files.
Hello, I've opened PR #247 to temporarily revert these breaking changes.
@zaro We've reverted the recursive feature in v8.2.1. You're more than welcome to open a new PR - taking the above into account. Thanks!
Thought: what if we used a glob pattern rather than a regex? The default would be *.node
and if you need nested files you could specify e.g. **/*.node
.