mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
Reorder elements.
Partial #592 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
2af2a42a88
commit
3a6d6724c9
2 changed files with 15 additions and 15 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue