Skip to content

Commit

Permalink
Fix handling env variables in absolute paths (args and env) (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiikhliustin authored Feb 29, 2024
1 parent a9f49d7 commit 972ad4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/BazelPodsCore/RuleUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
import Foundation

public func replacePodsEnvVars(_ value: String, options: BuildOptions, absolutePath: Bool) -> String {
// TODO: Investigate
let podDir = absolutePath ? options.absolutePath(from: options.podsRoot) : options.podsRoot
let PODS_TARGET_SRCROOT = absolutePath ? options.sourcePath : options.podTargetSrcRoot
let podDir = absolutePath ? options.sourcePath.appendingPath(options.podsRoot) : options.podsRoot
let PODS_TARGET_SRCROOT = absolutePath ? options.podTargetAbsoluteRoot : options.podTargetSrcRoot
return value
.replacingOccurrences(of: "$(inherited)", with: "")
.replacingOccurrences(of: "$(PODS_ROOT)", with: podDir)
Expand Down

0 comments on commit 972ad4d

Please sign in to comment.