Reorder elements.

Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
Ross Goldberg 2024-10-21 07:43:13 -04:00
parent 2af2a42a88
commit 3a6d6724c9
No known key found for this signature in database
2 changed files with 15 additions and 15 deletions

View file

@ -12,17 +12,6 @@ import Foundation
///
/// See - https://ss64.com/osx/sysctl.html
struct SysCtlSystemCommand: ExternalCommand {
var binaryPath: String
let process = Process()
let stdoutPipe = Pipe()
let stderrPipe = Pipe()
init(binaryPath: String = "/usr/sbin/sysctl") {
self.binaryPath = binaryPath
}
static var isAppleSilicon: Bool = {
let sysctl = Self()
do {
@ -38,4 +27,15 @@ struct SysCtlSystemCommand: ExternalCommand {
return sysctl.stdout.trimmingCharacters(in: .newlines) == "1"
}()
let process = Process()
let stdoutPipe = Pipe()
let stderrPipe = Pipe()
var binaryPath: String
init(binaryPath: String = "/usr/sbin/sysctl") {
self.binaryPath = binaryPath
}
}

View file

@ -35,10 +35,6 @@ struct Mas: ParsableCommand {
]
)
func validate() throws {
Self.initialize()
}
static func initialize() {
PromiseKit.conf.Q.map = .global()
PromiseKit.conf.Q.return = .global()
@ -54,6 +50,10 @@ struct Mas: ParsableCommand {
}
}
}
func validate() throws {
Self.initialize()
}
}
typealias AppID = UInt64