Skip to content

Commit

Permalink
Fix strip_prefix
Browse files Browse the repository at this point in the history
Fixes #221.

--
MOS_MIGRATED_REVID=104499510
  • Loading branch information
kchodorow authored and dslomov committed Oct 2, 2015
1 parent acd17e4 commit b2c7a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public SkyValue compute(SkyKey skyKey, SkyFunction.Environment env)
try {
AggregatingAttributeMapper mapper = AggregatingAttributeMapper.of(rule);
String prefix = null;
if (mapper.has("rm_path_prefix", Type.STRING)
&& !mapper.get("rm_path_prefix", Type.STRING).isEmpty()) {
prefix = mapper.get("rm_path_prefix", Type.STRING);
if (mapper.has("strip_prefix", Type.STRING)
&& !mapper.get("strip_prefix", Type.STRING).isEmpty()) {
prefix = mapper.get("strip_prefix", Type.STRING);
}
decompressed = (DecompressorValue) env.getValueOrThrow(
DecompressorValue.key(rule.getTargetKind(), rule.getName(),
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/bazel/external_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ new_http_archive(
name = "x",
url = "http://localhost:$nc_port/x.tar.gz",
sha256 = "$sha256",
rm_path_prefix = "x/y/z",
strip_prefix = "x/y/z",
build_file = "x.BUILD",
)
EOF
Expand Down

0 comments on commit b2c7a87

Please sign in to comment.