fix: Reset Program

This commit is contained in:
X1a0He
2025-03-27 16:39:52 +08:00
parent 96a8fc5934
commit 434e1ead09
2 changed files with 6 additions and 6 deletions

View File

@@ -48,8 +48,8 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "724"
endingLineNumber = "724"
landmarkName = "errorDescription"
landmarkType = "24">
landmarkName = "alertAction()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>

View File

@@ -676,13 +676,13 @@ struct CleanConfigView: View {
if PrivilegedHelperManager.getHelperStatus {
PrivilegedHelperManager.shared.executeCommand("open -a Terminal \(scriptURL.path)") { output in
if output.isEmpty {
if output.starts(with: "Error") {
alertMessage = "清空配置失败: \(output)"
showAlert = true
} else {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
exit(0)
}
} else {
alertMessage = "清空配置失败: \(output)"
showAlert = true
}
}
} else {