Skip to content

Commit

Permalink
(#1962) Use different message on error
Browse files Browse the repository at this point in the history
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 authored and gep13 committed Apr 19, 2021
1 parent 2e31696 commit 8e38976
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,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. Continuing, 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 {2}. 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 8e38976

Please sign in to comment.