File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -477,11 +477,8 @@ public struct BuildOptions: ParsableArguments {
477
477
)
478
478
public var linkTimeOptimizationMode : LinkTimeOptimizationMode ?
479
479
480
- @Flag ( help: . hidden)
481
- public var enableGetTaskAllowEntitlement : Bool = false
482
-
483
- @Flag ( help: . hidden)
484
- public var disableGetTaskAllowEntitlement : Bool = false
480
+ @Flag ( inversion: . prefixedEnableDisable, help: . hidden)
481
+ public var getTaskAllowEntitlement : Bool ? = nil
485
482
486
483
// @Flag works best when there is a default value present
487
484
// if true, false aren't enough and a third state is needed
Original file line number Diff line number Diff line change @@ -682,9 +682,7 @@ public final class SwiftTool {
682
682
component: targetTriple. platformBuildPathComponent ( buildSystem: options. build. buildSystem)
683
683
)
684
684
685
- if !targetTriple. isMacOSX && (
686
- options. build. disableGetTaskAllowEntitlement || options. build. enableGetTaskAllowEntitlement
687
- ) {
685
+ if options. build. getTaskAllowEntitlement != nil && !targetTriple. isMacOSX {
688
686
observabilityScope. emit ( warning: Self . entitlementsMacOSWarning)
689
687
}
690
688
@@ -705,8 +703,7 @@ public final class SwiftTool {
705
703
debugInfoFormat: options. build. debugInfoFormat. buildParameter,
706
704
targetTriple: targetTriple,
707
705
shouldEnableDebuggingEntitlement:
708
- ( options. build. configuration == . debug && !options. build. disableGetTaskAllowEntitlement) ||
709
- ( options. build. enableGetTaskAllowEntitlement && !options. build. disableGetTaskAllowEntitlement)
706
+ options. build. getTaskAllowEntitlement ?? ( options. build. configuration == . debug)
710
707
) ,
711
708
driverParameters: . init(
712
709
canRenameEntrypointFunctionName: driverSupport. checkSupportedFrontendFlags (
Original file line number Diff line number Diff line change @@ -5017,7 +5017,7 @@ final class WorkspaceTests: XCTestCase {
5017
5017
do {
5018
5018
let ws = try workspace.getOrCreateWorkspace()
5019
5019
let pinsStore = try ws.pinsStore.load()
5020
- let fooPin = pinsStore.pins.values.first(where: { $0.packageRef.identity.description == "foo" })!
5020
+ let fooPin = try XCTUnwrap( pinsStore.pins.values.first(where: { $0.packageRef.identity.description == "foo" }))
5021
5021
5022
5022
let fooRepo = workspace.repositoryProvider
5023
5023
.specifierMap[RepositorySpecifier(path: try AbsolutePath(
You can’t perform that action at this time.
0 commit comments