Skip to content

Commit 17a1a3e

Browse files
Allow kernel set with tar to use relative paths to tar file (apple#582)
## Type of Change - [x] Bug fix ## Description Allow kernel set with tar to use relative paths to tar file. Fixes apple#573. ## Motivation and Context `absoluteString` will prefix a scheme to the file path that looks like "file://". This will cause file manager to fail to find the file at the file path even if it exists. Change to instead just get the `path` of the file, which does not add a scheme prefix. ## Testing - [x] Tested locally Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
1 parent d6b2243 commit 17a1a3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/CLI/System/Kernel/KernelSet.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extension Application {
7777
throw ArgumentParser.ValidationError("Missing argument '--tar")
7878
}
7979
let platform = try getSystemPlatform()
80-
let localTarPath = URL(fileURLWithPath: tarPath, relativeTo: .currentDirectory()).absoluteString
80+
let localTarPath = URL(fileURLWithPath: tarPath, relativeTo: .currentDirectory()).path
8181
let fm = FileManager.default
8282
if fm.fileExists(atPath: localTarPath) {
8383
try await ClientKernel.installKernelFromTar(tarFile: localTarPath, kernelFilePath: binaryPath, platform: platform, force: force)

0 commit comments

Comments
 (0)