Skip to content

Commit af71a2d

Browse files
committed
Alert before patching.
1 parent 3359c08 commit af71a2d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

App/InjectionNext/FrontendServer.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ extension AppDelegate {
2020
let fm = FileManager.default
2121
do {
2222
let linksToMove = ["swift", "swiftc", "swift-symbolgraph-extract",
23-
"swift-api-digester", "swift-api-extract", "swift-cache-tool"]
23+
"swift-api-digester", "swift-cache-tool"]
2424
if sender.title == FrontendServer.State.unpatched.rawValue {
2525
if !fm.fileExists(atPath: FrontendServer.patched),
2626
let feeder = Bundle.main
2727
.url(forResource: "swift-frontend", withExtension: "sh") {
28+
InjectionServer.error("""
29+
The Swift compiler of your current toolchain \
30+
\(FrontendServer.unpatchedURL.path) will be \
31+
replaced by a symbolic link to a script to \
32+
capture all compilation commands. Use menu \
33+
item "Unpatch Compiler" to revert this change.
34+
""")
2835
try fm.moveItem(at: FrontendServer.unpatchedURL,
2936
to: FrontendServer.patchedURL)
3037
try fm.createSymbolicLink(at: FrontendServer
@@ -34,13 +41,6 @@ extension AppDelegate {
3441
try fm.removeItem(at: link)
3542
symlink("swift-frontend.save", link.path)
3643
}
37-
InjectionServer.error("""
38-
The Swift compiler of your current toolchain \
39-
\(FrontendServer.unpatchedURL.path) has been replaced \
40-
by a symbolic link to a script to capture all \
41-
compilation commands. Use menu item "Unpatch \
42-
Compiler" to revert this change.
43-
""")
4444
}
4545
} else if fm.fileExists(atPath: FrontendServer.patched) {
4646
try? fm.removeItem(at: FrontendServer.unpatchedURL)

App/InjectionNext/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleVersion</key>
22-
<string>10811</string>
22+
<string>10813</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.developer-tools</string>
2525
<key>LSMinimumSystemVersion</key>

0 commit comments

Comments
 (0)