File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -354,34 +354,35 @@ public class SwiftTool {
354
354
verbosity = Verbosity ( rawValue: options. verbosity)
355
355
Process . verbose = verbosity != . concise
356
356
}
357
-
357
+
358
358
static func postprocessArgParserResult( options: SwiftToolOptions , diagnostics: DiagnosticsEngine ) throws {
359
359
if options. chdir != nil {
360
360
diagnostics. emit ( warning: " '--chdir/-C' option is deprecated; use '--package-path' instead " )
361
361
}
362
-
362
+
363
363
if options. multirootPackageDataFile != nil {
364
364
diagnostics. emit ( . unsupportedFlag( " --multiroot-data-file " ) )
365
365
}
366
-
366
+
367
367
if options. useExplicitModuleBuild && !options. useIntegratedSwiftDriver {
368
368
diagnostics. emit ( error: " '--experimental-explicit-module-build' option requires '--use-integrated-swift-driver' " )
369
369
}
370
-
370
+
371
371
if !options. archs. isEmpty && options. customCompileTriple != nil {
372
372
diagnostics. emit ( . mutuallyExclusiveArgumentsError( arguments: [ " --arch " , " --triple " ] ) )
373
373
}
374
-
374
+
375
375
if options. netrcFilePath != nil {
376
- // --netrc-file option only supported on macOS >=10.13
377
- #if os(macOS)
378
- if #available( macOS 10 . 13 , * ) {
379
- // ok, check succeeds
380
- } else {
376
+ // --netrc-file option only supported on macOS >=10.13
377
+ #if os(macOS)
378
+ if #available( macOS 10 . 13 , * ) {
379
+ // ok, check succeeds
380
+ } else {
381
381
diagnostics. emit ( error: " --netrc-file option is only supported on macOS >=10.13 " )
382
- }
383
- #else
384
- diagnostics. emit ( error: " --netrc-file option is only supported on macOS >=10.13 " )
382
+ }
383
+ #else
384
+ diagnostics. emit ( error: " --netrc-file option is only supported on macOS >=10.13 " )
385
+ #endif
385
386
}
386
387
}
387
388
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ final class PackageToolTests: XCTestCase {
55
55
#if os(macOS)
56
56
if #available( macOS 10 . 13 , * ) {
57
57
// should succeed
58
- XCTAssert ( try execute ( [ " --netrc-file " , " /Users/me/.hidden/.netrc " ] ) . stdout. contains ( " Absolute path to netrc file " ) )
58
+ XCTAssert ( try execute ( [ " --netrc-file " , " /Users/me/.hidden/.netrc " ] ) . stdout. contains ( " USAGE: swift package " ) )
59
59
} else {
60
60
verifyUnsupportedOSThrows ( )
61
61
}
You can’t perform that action at this time.
0 commit comments