Skip to content

Commit 7a77898

Browse files
authored
Merge pull request #557 from ahoppen/pr/no-docc-if-local-dependencies
Use SWIFTCI_USE_LOCAL_DEPS to check whether to clone swift-docc-plugin
2 parents 7a97341 + e01c300 commit 7a77898

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ let package = Package(
142142
]
143143
)
144144

145-
if ProcessInfo.processInfo.environment["SWIFT_BUILD_SCRIPT_ENVIRONMENT"] == nil {
145+
// If `SWIFTCI_USE_LOCAL_DEPS` is set, we are in a CI enviornment that might disallow
146+
// internet access, so we can't load swift-docc-plugin. Simply don't load it in these
147+
// environments because we don't build docc in CI at the moment.
148+
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
146149
package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"))
147150
}

0 commit comments

Comments
 (0)