Skip to content

Commit

Permalink
Map env
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed May 24, 2024
1 parent 124d3c2 commit 1a21e7d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,14 @@ public ImmutableMap<String, String> getIncompleteEnvironmentForTesting()
}
}

@Override()
@Override
public ImmutableMap<String, String> getEffectiveEnvironment(Map<String, String> clientEnv)
throws CommandLineExpansionException {
return getEffectiveEnvironment(clientEnv, PathMapper.NOOP);
}

public ImmutableMap<String, String> getEffectiveEnvironment(
Map<String, String> clientEnv, PathMapper pathMapper) throws CommandLineExpansionException {
ActionEnvironment env = getEnvironment();
Map<String, String> environment = Maps.newLinkedHashMapWithExpectedSize(env.estimatedSize());
env.resolve(environment, clientEnv);
Expand Down Expand Up @@ -1567,7 +1572,7 @@ Spawn createSpawn(Path execRoot, Map<String, String> clientEnv, PathMapper pathM
return new SimpleSpawn(
this,
ImmutableList.copyOf(getArguments(pathMapper)),
getEffectiveEnvironment(clientEnv),
getEffectiveEnvironment(clientEnv, pathMapper),
executionInfo.buildOrThrow(),
/* filesetMappings= */ ImmutableMap.of(),
inputs,
Expand Down

0 comments on commit 1a21e7d

Please sign in to comment.