Skip to content
Merged

Cleanup #1117

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use function references instead of closures.
Signed-off-by: Ross Goldberg <[email protected]>
  • Loading branch information
rgoldberg committed Dec 14, 2025
commit 4468b004af026aa5593d3ceed22e1adf1393a18b
4 changes: 2 additions & 2 deletions Sources/mas/Utilities/ProcessInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private import Foundation
extension ProcessInfo {
var sudoUID: uid_t {
get throws {
guard let sudoUID = environment["SUDO_UID"].flatMap({ uid_t($0) }) else {
guard let sudoUID = environment["SUDO_UID"].flatMap(uid_t.init) else {
throw MASError.error("Failed to get sudo uid")
}

Expand All @@ -21,7 +21,7 @@ extension ProcessInfo {

var sudoGID: gid_t {
get throws {
guard let sudoGID = environment["SUDO_GID"].flatMap({ gid_t($0) }) else {
guard let sudoGID = environment["SUDO_GID"].flatMap(gid_t.init) else {
throw MASError.error("Failed to get sudo gid")
}

Expand Down