Skip to content

Commit 11ba9cc

Browse files
committed
Update Package.swift
1 parent 29bfa6a commit 11ba9cc

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Core/Package.swift

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ let package = Package(
366366
extension [Target.Dependency] {
367367
func pro(_ targetNames: [String]) -> [Target.Dependency] {
368368
if isProIncluded {
369-
// include the pro package
370369
return self + targetNames.map { Target.Dependency.product(name: $0, package: "Pro") }
371370
}
372371
return self
@@ -376,27 +375,22 @@ extension [Target.Dependency] {
376375
extension [Package.Dependency] {
377376
var pro: [Package.Dependency] {
378377
if isProIncluded {
379-
// include the pro package
380-
return self + [.package(path: "../../CopilotForXcodePro/Pro")]
378+
return self + [.package(path: "../../Pro")]
381379
}
382380
return self
383381
}
384382
}
385383

386-
let isProIncluded: Bool = {
384+
var isProIncluded: Bool {
387385
func isProIncluded(file: StaticString = #file) -> Bool {
388386
let filePath = "\(file)"
389387
let fileURL = URL(fileURLWithPath: filePath)
390388
let rootURL = fileURL
391389
.deletingLastPathComponent()
392390
.deletingLastPathComponent()
393-
.deletingLastPathComponent()
394391
let confURL = rootURL.appendingPathComponent("PLUS")
395-
if !FileManager.default.fileExists(atPath: confURL.path) {
396-
return false
397-
}
398-
return true
392+
return FileManager.default.fileExists(atPath: confURL.path)
399393
}
400394

401395
return isProIncluded()
402-
}()
396+
}

0 commit comments

Comments
 (0)