Skip to content

Commit d8cb090

Browse files
committed
Fix: Tasks In Folder With Spaces
1 parent 40d6016 commit d8cb090

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CodeEdit/Features/CEWorkspaceSettings/Models/CETask.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CETask: ObservableObject, Identifiable, Hashable, Codable {
4242
/// Ensures that the shell navigates to the correct folder, and then executes the specified command.
4343
var fullCommand: String {
4444
// Move into the specified folder if needed
45-
let changeDirectoryCommand = workingDirectory.isEmpty ? "" : "cd \(workingDirectory) && "
45+
let changeDirectoryCommand = workingDirectory.isEmpty ? "" : "cd \"\(workingDirectory)\" && "
4646

4747
// Construct the full command
4848
return "\(changeDirectoryCommand)\(command)"

CodeEdit/Features/Tasks/Models/CEActiveTask.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CEActiveTask: ObservableObject, Identifiable, Hashable {
4040
// Because: CETask only contains information about the relative path.
4141
let fullCommand: String
4242
if let workspaceURL = workspaceURL {
43-
fullCommand = "cd \(workspaceURL.relativePath) && \(task.fullCommand)"
43+
fullCommand = "cd \"\(workspaceURL.relativePath)\" && \(task.fullCommand)"
4444
} else {
4545
fullCommand = task.fullCommand
4646
}

0 commit comments

Comments
 (0)