Skip to content

Commit

Permalink
fix(CocoaPods): Correctly resolve the user home directory
Browse files Browse the repository at this point in the history
A `File` does not expand `~` automatically.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Sep 22, 2023
1 parent 18f9be2 commit a2fa752
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class CocoaPods(
override fun beforeResolution(definitionFiles: List<File>) = checkVersion()

override fun resolveDependencies(definitionFile: File, labels: Map<String, String>): List<ProjectAnalyzerResult> {
return stashDirectories(File("~/.cocoapods/repos")).use {
return stashDirectories(Os.userHomeDirectory.resolve(".cocoapods/repos")).use {
// Ensure to use the CDN instead of the monolithic specs repo.
run("repo", "add-cdn", "trunk", "https://cdn.cocoapods.org", "--allow-root")

Expand Down

0 comments on commit a2fa752

Please sign in to comment.