Skip to content

Commit

Permalink
Fixed url building for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
viaszkadi committed Oct 19, 2024
1 parent ce436f6 commit f386e59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/toucan-cli/Commands/Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extension Entrypoint.Init {
}

var siteDirUrl: URL {
currentDirUrl.appending(path: siteDirectory)
currentDirUrl.appendingPathComponent(siteDirectory)
}

var exampleSourceUrl: URL {
Expand All @@ -80,7 +80,7 @@ extension Entrypoint.Init {
}

var themesDefaultDirUrl: URL {
siteDirUrl.appending(path: "src/themes/default")
siteDirUrl.appendingPathComponent("src/themes/default")
}
}

Expand All @@ -94,7 +94,7 @@ extension Entrypoint.Init {
let fileManager: FileManager

private var url: URL {
fileManager.temporaryDirectory.appending(path: id)
fileManager.temporaryDirectory.appendingPathComponent(id)
}

private var zipUrl: URL {
Expand All @@ -120,7 +120,7 @@ extension Entrypoint.Init {
guard let rootDirName = items.first else {
throw URLError(.cannotParseResponse)
}
let rootDirUrl = url.appending(path: rootDirName)
let rootDirUrl = url.appendingPathComponent(rootDirName)

/// Moving files to the target directory.
try fileManager.moveItem(at: rootDirUrl, to: targetDirUrl)
Expand Down

0 comments on commit f386e59

Please sign in to comment.