Skip to content
Merged
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
14 changes: 7 additions & 7 deletions Formula/swift.rb
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ def caveats
assert_match "www.swift.org\n", output

# Test Swift Package Manager
ENV["SWIFTPM_MODULECACHE_OVERRIDE"] = module_cache
mkdir "swiftpmtest" do
if OS.mac?
# Swift Package Manager does not currently support using SDKROOT.
ENV.remove_macosxsdk
end
# Swift Package Manager does not currently support using SDKROOT.
ENV.remove_macosxsdk if OS.mac?

system "#{bin}/swift", "package", "init", "--type=executable"
cp "../foundation-test.swift", "Sources/swiftpmtest/main.swift"
system "#{bin}/swift", "build", "--verbose", "--disable-sandbox"
Expand All @@ -469,10 +469,10 @@ def caveats
# Make sure the default resource directory is not using a Cellar path
default_resource_dir = JSON.parse(shell_output("#{bin}/swift -print-target-info"))["paths"]["runtimeResourcePath"]
expected_resource_dir = if OS.mac?
(opt_prefix/"Swift-#{version.major_minor}.xctoolchain/usr/lib/swift").to_s
opt_prefix/"Swift-#{version.major_minor}.xctoolchain/usr/lib/swift"
else
(opt_libexec/"lib/swift").to_s
end
opt_libexec/"lib/swift"
end.to_s
assert_equal expected_resource_dir, default_resource_dir
end
end