Skip to content

Commit fd1cc46

Browse files
edvilmedsplaisted
authored andcommitted
Remove prompt for normal and quiter verbosities
1 parent 9fd3045 commit fd1cc46

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Cli/dotnet/Commands/Tool/Execute/ToolExecuteCommand.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,17 @@ private bool UserAgreedToRunFromSource()
8080
// TODO: Use a better way to ask for user input
8181
Console.Write(CliCommandStrings.ToolRunFromSourceUserConfirmationPrompt);
8282
bool userAccepted = Console.ReadKey().Key == ConsoleKey.Y;
83-
Console.WriteLine();
84-
Console.WriteLine(new string('─', CliCommandStrings.ToolRunFromSourceUserConfirmationPrompt.Length));
83+
if (_verbosity >= VerbosityOptions.detailed)
84+
{
85+
Console.WriteLine();
86+
Console.WriteLine(new String('-', CliCommandStrings.ToolRunFromSourceUserConfirmationPrompt.Length));
87+
}
88+
else
89+
{
90+
// Clear the line
91+
Console.Write("\r" + new string(' ', CliCommandStrings.ToolRunFromSourceUserConfirmationPrompt.Length + 1) + "\r");
92+
}
93+
8594
return userAccepted;
8695
}
8796
}

0 commit comments

Comments
 (0)