Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion swiftpkg/internal/repository_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def _file_type(repository_ctx, path):
A `string` representing the file type for the path as returned by the
`file` utility.
"""
file_args = ["file", "--brief", path]
file_args = ["file", "--dereference", "--brief", path]
exec_result = repository_ctx.execute(file_args, quiet = True)
if exec_result.return_code != 0:
fail("Failed to determine the file type for {path}. stderr:\n{stderr}".format(
Expand Down
6 changes: 3 additions & 3 deletions swiftpkg/tests/testutils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def _new_stub_repository_ctx(
exec_result = _new_exec_result(
stdout = "\n".join(results),
)
elif args_len == 3 and args[0] == "file" and args[1] == "--brief":
# Expected command: `file --brief path`
path = args[2]
elif args_len == 4 and args[0] == "file" and args[1] == "--dereference" and args[2] == "--brief":
# Expected command: `file --dereference --brief path`
path = args[3]
results = file_type_results.get(path, "")
exec_result = _new_exec_result(stdout = results)
elif args_len == 3 and args[0] == "otool" and args[1] == "-l":
Expand Down