Skip to content

Commit

Permalink
Merge pull request #20 from Cleverlance/feature/adjust_verbose_build
Browse files Browse the repository at this point in the history
Adjust verbosity of build
  • Loading branch information
raptorxcz authored Apr 1, 2022
2 parents e07163b + e8a0a3a commit a5d60d6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/SwiftTools/Build/Domain/BuildInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ public protocol BuildInteractor {
final class BuildInteractorImpl: BuildInteractor {
private let shellService: ShellService
private let printService: PrintService
private let verboseController: VerboseController

init(shellService: ShellService, printService: PrintService) {
init(shellService: ShellService, printService: PrintService, verboseController: VerboseController) {
self.shellService = shellService
self.printService = printService
self.verboseController = verboseController
}

func build(with arguments: BuildArguments) throws {
Expand Down Expand Up @@ -48,7 +50,10 @@ final class BuildInteractorImpl: BuildInteractor {
let destination = try getDestination(for: platform, scheme: scheme)
buildArguments += ["-destination", destination]
}
return buildArguments + arguments + ["-quiet"]
if !verboseController.isVerbose() {
buildArguments += ["-quiet"]
}
return buildArguments + arguments
}

private func getDestination(for platform: Platform, scheme: String) throws -> String {
Expand Down

0 comments on commit a5d60d6

Please sign in to comment.