Skip to content

Commit

Permalink
Fix for case-sensitive FS while using paket’s packages folder (#101)
Browse files Browse the repository at this point in the history
* fix for case-sensitive FS while using paket’s `packages` folder
  • Loading branch information
pletoss authored Sep 21, 2023
1 parent 9f81643 commit dd1b078
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ class PaketUPMWrapperReference {
}

public static String getPackagesDirectory(Project project) {
def lowerCasePackages = project.file("packages");
def upperCasePackages = project.file("Packages");

// NOTE: on case-insensitife FS both "Packages" and "packages" will exist, however if we filter using gradle, it's case sensitive.
// So we need to use teh .canonicalFile which normalizes to the one that actually is case-sensitive on the FS

// in "single-project"-mode, we install paket into `Packages`. Otherwise we use `packages`
return upperCasePackages.exists() ? upperCasePackages.canonicalFile.name : lowerCasePackages.canonicalFile.name;
// this will return "Packages" on case-INsensitive FS and the proper "packages" in case-senitive FS
return project.file("packages").canonicalFile.name
}

}
Expand Down

0 comments on commit dd1b078

Please sign in to comment.