Skip to content

Commit a2fa752

Browse files
committed
fix(CocoaPods): Correctly resolve the user home directory
A `File` does not expand `~` automatically. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 18f9be2 commit a2fa752

File tree

1 file changed

+1
-1
lines changed
  • plugins/package-managers/cocoapods/src/main/kotlin

1 file changed

+1
-1
lines changed

plugins/package-managers/cocoapods/src/main/kotlin/CocoaPods.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class CocoaPods(
102102
override fun beforeResolution(definitionFiles: List<File>) = checkVersion()
103103

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

0 commit comments

Comments
 (0)