Skip to content

Commit a65d2e9

Browse files
committed
Fix path calculation for packages
1 parent 4c3ef33 commit a65d2e9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/DependencyCalculator/DependencyGraph.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,15 @@ extension WorkspaceInfo {
246246
}
247247
}
248248

249-
static func parsePackages(in path: Path,
249+
static func parsePackages(in proposedPath: Path,
250250
includeRootPackage: Bool,
251251
exclude: [String]) throws -> (WorkspaceInfo, [PackageTargetMetadata])
252252
{
253+
var path = proposedPath
254+
if path.extension == "xcworkspace" || path.extension == "xcodeproj" {
255+
path = proposedPath.parent()
256+
}
257+
253258
var dependsOn: [TargetIdentity: Set<TargetIdentity>] = [:]
254259
var folders: [Path: TargetIdentity] = [:]
255260
var files: [TargetIdentity: Set<Path>] = [:]

0 commit comments

Comments
 (0)