@@ -1098,7 +1098,7 @@ extension Workspace {
1098
1098
1099
1099
// Remove the existing checkout.
1100
1100
do {
1101
- let oldCheckoutPath = self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
1101
+ let oldCheckoutPath = self . location. repositoriesCheckoutSubdirectory ( for : dependency)
1102
1102
try fileSystem. chmod ( . userWritable, path: oldCheckoutPath, options: [ . recursive, . onlyFiles] )
1103
1103
try fileSystem. removeFileTree ( oldCheckoutPath)
1104
1104
}
@@ -1136,7 +1136,7 @@ extension Workspace {
1136
1136
}
1137
1137
1138
1138
// Form the edit working repo path.
1139
- let path = self . location. editsDirectory . appending ( dependency. subpath )
1139
+ let path = self . location. editsSubdirectory ( for : dependency)
1140
1140
// Check for uncommited and unpushed changes if force removal is off.
1141
1141
if !forceRemove {
1142
1142
let workingCopy = try repositoryManager. openWorkingCopy ( at: path)
@@ -1426,9 +1426,9 @@ extension Workspace {
1426
1426
public func path( to dependency: Workspace . ManagedDependency ) -> AbsolutePath {
1427
1427
switch dependency. state {
1428
1428
case . checkout:
1429
- return self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
1429
+ return self . location. repositoriesCheckoutSubdirectory ( for : dependency)
1430
1430
case . edited( _, let path) :
1431
- return path ?? self . location. editsDirectory . appending ( dependency. subpath )
1431
+ return path ?? self . location. editsSubdirectory ( for : dependency)
1432
1432
case . local:
1433
1433
return AbsolutePath ( dependency. packageRef. location)
1434
1434
}
@@ -2986,7 +2986,7 @@ extension Workspace {
2986
2986
/// Removes the clone and checkout of the provided specifier.
2987
2987
fileprivate func removeRepository( dependency: ManagedDependency ) throws {
2988
2988
// Remove the checkout.
2989
- let dependencyPath = self . location. repositoriesCheckoutsDirectory . appending ( dependency. subpath )
2989
+ let dependencyPath = self . location. repositoriesCheckoutSubdirectory ( for : dependency)
2990
2990
let workingCopy = try self . repositoryManager. openWorkingCopy ( at: dependencyPath)
2991
2991
guard !workingCopy. hasUncommittedChanges ( ) else {
2992
2992
throw WorkspaceDiagnostics . UncommitedChanges ( repositoryPath: dependencyPath)
0 commit comments