diff --git a/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift b/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift index 7b20608..0420781 100644 --- a/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift +++ b/Sources/XCRemoteCache/Commands/Postbuild/XCPostbuild.swift @@ -67,7 +67,7 @@ public class XCPostbuild { let primaryGitBranch = GitBranch(repoLocation: config.primaryRepo, branch: config.primaryBranch) let gitClient = GitClientImpl(repoRoot: config.repoRoot, primary: primaryGitBranch, shell: shellGetStdout) let pathRemapper = try StringDependenciesRemapperFactory().build( - orderKeys: DependenciesMapping.rewrittenEnvs + config.outOfBandMappings.keys, + orderKeys: DependenciesMapping.rewrittenEnvs, envs: env, customMappings: config.outOfBandMappings ) diff --git a/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift b/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift index 2651214..9eba5d8 100644 --- a/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift +++ b/Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift @@ -116,7 +116,7 @@ public class XCPrebuild { let client: NetworkClient = config.disableHttpCache ? networkClient : cacheNetworkClient let remoteNetworkClient = RemoteNetworkClientImpl(client, urlBuilder) let pathRemapper = try StringDependenciesRemapperFactory().build( - orderKeys: DependenciesMapping.rewrittenEnvs + config.outOfBandMappings.keys, + orderKeys: DependenciesMapping.rewrittenEnvs, envs: env, customMappings: config.outOfBandMappings ) diff --git a/Tests/XCRemoteCacheTests/Dependencies/DependenciesRemapperCompositeTests.swift b/Tests/XCRemoteCacheTests/Dependencies/DependenciesRemapperCompositeTests.swift index 3a31938..7ced964 100644 --- a/Tests/XCRemoteCacheTests/Dependencies/DependenciesRemapperCompositeTests.swift +++ b/Tests/XCRemoteCacheTests/Dependencies/DependenciesRemapperCompositeTests.swift @@ -103,7 +103,7 @@ class DependenciesRemapperCompositeTests: XCTestCase { XCTAssertEqual(localPaths, ["/root/specific/file"]) } - func testRemappingBackAndForthIsIdentity() throws { + func testRemappingTwoMappingsBackAndForthIsIdentical() throws { let remapper = DependenciesRemapperComposite([ StringDependenciesRemapper(mappings: [StringDependenciesRemapper.Mapping(generic: "$(ROOT)", local: "/root")]), StringDependenciesRemapper(mappings: [StringDependenciesRemapper.Mapping(generic: "$(SPECIFIC)", local: "$(ROOT)/specific")])