From f386e593fdb4e0a01209c247ba6c06593f0a6b22 Mon Sep 17 00:00:00 2001 From: Ferenc Viasz-Kadi Date: Sat, 19 Oct 2024 11:50:14 +0200 Subject: [PATCH] Fixed url building for Linux --- Sources/toucan-cli/Commands/Init.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/toucan-cli/Commands/Init.swift b/Sources/toucan-cli/Commands/Init.swift index e30d8fd4..39477b4c 100644 --- a/Sources/toucan-cli/Commands/Init.swift +++ b/Sources/toucan-cli/Commands/Init.swift @@ -62,7 +62,7 @@ extension Entrypoint.Init { } var siteDirUrl: URL { - currentDirUrl.appending(path: siteDirectory) + currentDirUrl.appendingPathComponent(siteDirectory) } var exampleSourceUrl: URL { @@ -80,7 +80,7 @@ extension Entrypoint.Init { } var themesDefaultDirUrl: URL { - siteDirUrl.appending(path: "src/themes/default") + siteDirUrl.appendingPathComponent("src/themes/default") } } @@ -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 { @@ -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)