Skip to content

Commit

Permalink
[msbuild] Log a bit more info about process execution. (#21595)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Nov 21, 2024
1 parent 611c7a1 commit 6efc90f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ internal protected static async System.Threading.Tasks.Task<Execution> ExecuteAs
launchEnvironment ["DEVELOPER_DIR"] = sdkDevPath;

log.LogMessage (MessageImportance.Normal, MSBStrings.M0001, fileName, StringUtils.FormatArguments (arguments));
if (!string.IsNullOrEmpty (workingDirectory)) {
log.LogMessage (MessageImportance.Low, " Working directory: {0}", workingDirectory);
} else {
log.LogMessage (MessageImportance.Low, " Current directory: {0}", Environment.CurrentDirectory);
}
if (launchEnvironment?.Any () == true) {
log.LogMessage (MessageImportance.Low, " With environment:");
foreach (var kvp in launchEnvironment) {
log.LogMessage (MessageImportance.Low, " {0}={1}", kvp.Key, kvp.Value);
}
}
var rv = await Execution.RunAsync (fileName, arguments, environment: launchEnvironment, mergeOutput: mergeOutput, workingDirectory: workingDirectory, cancellationToken: cancellationToken);
log.LogMessage (rv.ExitCode == 0 ? MessageImportance.Low : MessageImportance.High, MSBStrings.M0002, fileName, rv.ExitCode);

Expand Down

6 comments on commit 6efc90f

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.