Skip to content

Commit

Permalink
Xcode with spaces in path.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnno1962 committed Jul 22, 2022
1 parent 3798f20 commit 0953955
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/HotReloading/SwiftEval.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by John Holdsworth on 02/11/2017.
// Copyright © 2017 John Holdsworth. All rights reserved.
//
// $Id: //depot/HotReloading/Sources/HotReloading/SwiftEval.swift#66 $
// $Id: //depot/HotReloading/Sources/HotReloading/SwiftEval.swift#67 $
//
// Basic implementation of a Swift "eval()" including the
// mechanics of recompiling a class and loading the new
Expand Down Expand Up @@ -512,10 +512,14 @@ public class SwiftEval: NSObject {
if let match = Self.parsePlatform.firstMatch(in: compileCommand,
options: [], range: NSMakeRange(0, compileCommand.utf16.count)) {
if let sdkRange = Range(match.range(at: 1), in: compileCommand) {
sdk = String(compileCommand[sdkRange])
sdk = compileCommand[sdkRange]
.replacingOccurrences(of: #"\\(.)"#, with: "$1",
options: .regularExpression)
}
if let devRange = Range(match.range(at: 2), in: compileCommand) {
xcodeDev = String(compileCommand[devRange])
xcodeDev = compileCommand[devRange]
.replacingOccurrences(of: #"\\(.)"#, with: "$1",
options: .regularExpression)
}
if let pltRange = Range(match.range(at: 4), in: compileCommand) {
platform = String(compileCommand[pltRange])
Expand Down

0 comments on commit 0953955

Please sign in to comment.