Skip to content

Commit fbd5f3c

Browse files
authored
Remove private prefix in execution root path (#3229)
1 parent ac524b3 commit fbd5f3c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ END_UNRELEASED_TEMPLATE
5656

5757
### Fixed
5858

59-
* TBD
59+
* Fixed incompatible output base causing startup options change: [#3229](https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/3229)
6060

6161
### Ruleset Development Changes
6262

xcodeproj/internal/execution_root.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ def write_execution_root_file(*, actions, bin_dir_path, name):
44
"""Creates a `File` containing the absolute path to the Bazel execution \
55
root.
66
7+
If the execution root is under `/private/`, this prefix is stripped so that
8+
we don't end up with a different path than what Xcode uses (since we also
9+
remove this prefix for Xcode).
10+
711
Args:
812
actions: `ctx.actions`.
913
bin_dir_path: `ctx.bin_dir.path`.
@@ -19,6 +23,9 @@ def write_execution_root_file(*, actions, bin_dir_path, name):
1923
command = """\
2024
bin_dir_full="$(perl -MCwd -e 'print Cwd::abs_path shift' "{bin_dir}";)"
2125
execution_root="${{bin_dir_full%/{bin_dir}}}"
26+
if [[ $execution_root == /private/* ]]; then
27+
execution_root="${{execution_root#/private}}"
28+
fi
2229
2330
echo "$execution_root" > "{output}"
2431
""".format(

0 commit comments

Comments
 (0)