Skip to content

Commit

Permalink
forward confirm override (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 authored Jul 14, 2020
1 parent 9b61e22 commit 150526c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/VaporToolbox/Run.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ struct Run: AnyCommand {
let help = "Runs an app from the console."

func run(using context: inout CommandContext) throws {
try exec(Process.shell.which("swift"), ["run", "--enable-test-discovery", "Run"] + context.input.arguments)
var extraArguments: [String] = []
if let confirmOverride = context.console.confirmOverride {
extraArguments.append(confirmOverride ? "--yes" : "--no")
}
try exec(Process.shell.which("swift"), ["run", "--enable-test-discovery", "Run"] + context.input.arguments + extraArguments)
}

func outputHelp(using context: inout CommandContext) {
Expand Down

0 comments on commit 150526c

Please sign in to comment.