|
10 | 10 |
|
11 | 11 | import func Foundation.NSUserName
|
12 | 12 | import class Foundation.ProcessInfo
|
13 |
| -import func Foundation.NSHomeDirectory |
14 | 13 | import Dispatch
|
15 | 14 |
|
16 | 15 | import ArgumentParser
|
@@ -354,34 +353,35 @@ public class SwiftTool {
|
354 | 353 | verbosity = Verbosity(rawValue: options.verbosity)
|
355 | 354 | Process.verbose = verbosity != .concise
|
356 | 355 | }
|
357 |
| - |
| 356 | + |
358 | 357 | static func postprocessArgParserResult(options: SwiftToolOptions, diagnostics: DiagnosticsEngine) throws {
|
359 | 358 | if options.chdir != nil {
|
360 | 359 | diagnostics.emit(warning: "'--chdir/-C' option is deprecated; use '--package-path' instead")
|
361 | 360 | }
|
362 |
| - |
| 361 | + |
363 | 362 | if options.multirootPackageDataFile != nil {
|
364 | 363 | diagnostics.emit(.unsupportedFlag("--multiroot-data-file"))
|
365 | 364 | }
|
366 |
| - |
| 365 | + |
367 | 366 | if options.useExplicitModuleBuild && !options.useIntegratedSwiftDriver {
|
368 | 367 | diagnostics.emit(error: "'--experimental-explicit-module-build' option requires '--use-integrated-swift-driver'")
|
369 | 368 | }
|
370 |
| - |
| 369 | + |
371 | 370 | if !options.archs.isEmpty && options.customCompileTriple != nil {
|
372 | 371 | diagnostics.emit(.mutuallyExclusiveArgumentsError(arguments: ["--arch", "--triple"]))
|
373 | 372 | }
|
374 |
| - |
| 373 | + |
375 | 374 | 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 { |
| 375 | + // --netrc-file option only supported on macOS >=10.13 |
| 376 | + #if os(macOS) |
| 377 | + if #available(macOS 10.13, *) { |
| 378 | + // ok, check succeeds |
| 379 | + } else { |
381 | 380 | 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") |
| 381 | + } |
| 382 | + #else |
| 383 | + diagnostics.emit(error: "--netrc-file option is only supported on macOS >=10.13") |
| 384 | + #endif |
385 | 385 | }
|
386 | 386 | }
|
387 | 387 |
|
|
0 commit comments