mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-11 03:57:23 +01:00
Add restart
This commit is contained in:
@@ -6,6 +6,7 @@ import SecretKit
|
||||
protocol AgentStatusCheckerProtocol: ObservableObject {
|
||||
var running: Bool { get }
|
||||
var developmentBuild: Bool { get }
|
||||
func restart()
|
||||
}
|
||||
|
||||
class AgentStatusChecker: ObservableObject, AgentStatusCheckerProtocol {
|
||||
@@ -37,12 +38,15 @@ class AgentStatusChecker: ObservableObject, AgentStatusCheckerProtocol {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
// Whether Secretive is being run in an Xcode environment.
|
||||
var developmentBuild: Bool {
|
||||
Bundle.main.bundleURL.absoluteString.contains("/Library/Developer/Xcode")
|
||||
}
|
||||
|
||||
func restart() {
|
||||
instanceSecretAgentProcess?.forceTerminate()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user