-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add the verbose output of the internal call to dotnet in dotnet-ef
#37643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -82,6 +82,8 @@ public static Project FromFile( | |||||||||||||||
|
|
||||||||||||||||
| var output = new StringBuilder(); | ||||||||||||||||
|
|
||||||||||||||||
| Reporter.WriteVerbose(Resources.RunningCommand("dotnet " + string.Join(" ", args))); | ||||||||||||||||
|
|
||||||||||||||||
| var exitCode = Exe.Run("dotnet", args, handleOutput: line => output.AppendLine(line)); | ||||||||||||||||
| if (exitCode != 0) | ||||||||||||||||
| { | ||||||||||||||||
|
|
@@ -93,6 +95,8 @@ public static Project FromFile( | |||||||||||||||
| throw new CommandException(Resources.GetMetadataFailed); | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| Reporter.WriteVerbose(output.ToString()); | ||||||||||||||||
|
|
||||||||||||||||
| var metadata = JsonSerializer.Deserialize<ProjectMetadata>(output.ToString())!; | ||||||||||||||||
|
Comment on lines
+98
to
100
|
||||||||||||||||
| Reporter.WriteVerbose(output.ToString()); | |
| var metadata = JsonSerializer.Deserialize<ProjectMetadata>(output.ToString())!; | |
| var outputString = output.ToString(); | |
| Reporter.WriteVerbose(outputString); | |
| var metadata = JsonSerializer.Deserialize<ProjectMetadata>(outputString)!; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exe.Runalready writes the executed command line to verbose output (and does correct quoting viaExe.ToArguments). The addedRunningCommand("dotnet " + string.Join(" ", args))duplicates that output and can be misleading for paths/args containing spaces since it doesn't quote/escape. Consider removing this line and instead passingprocessCommandLinetoExe.Runto wrap the already-formatted command string (or useExe.ToArguments(args)when composing the message).