Skip to content

Commit

Permalink
(GH-1962) Use a different message for error result in handle_package_…
Browse files Browse the repository at this point in the history
…result.

Currently, the method logs that the command was "completed" even if it failed. A log that says the step failed would make more sense to the user in this case.
  • Loading branch information
cowmanjoe committed Jan 5, 2020
1 parent 564a652 commit f7aff3f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ public virtual void handle_package_result(PackageResult packageResult, Chocolate
EnvironmentSettings.reset_environment_variables(config);
set_pending(packageResult, config);

this.Log().Info("{0} package files {1} completed. Performing other installation steps.".format_with(packageResult.Name, commandName.to_string()));
this.Log().Info(packageResult.ExitCode == 0
? "{0} package files {1} completed. Performing other installation steps.".format_with(packageResult.Name, commandName.to_string())
: "{0} package files {1} failed with exit code {3}. Performing other installation steps.".format_with(packageResult.Name, commandName.to_string(), packageResult.ExitCode));

var pkgInfo = get_package_information(packageResult, config);

Expand Down

0 comments on commit f7aff3f

Please sign in to comment.