File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ protected class CommandInfo
2121 public Func < string > ArgumentsGenerator { get ; set ; }
2222 public bool MergeStdoutAndStderr { get ; set ; } = true ;
2323 public bool IgnoreExitCode { get ; set ; }
24+ public bool LogIgnoredExitCodeAsWarning { get ; set ; } = true ;
2425 public string StdoutFilePath { get ; set ; }
2526 public bool StdoutAppend { get ; set ; }
2627 public string StderrFilePath { get ; set ; }
@@ -88,7 +89,11 @@ public override bool Execute ()
8889 Log . LogError ( message ) ;
8990 break ;
9091 }
91- Log . LogWarning ( message ) ;
92+
93+ if ( info . LogIgnoredExitCodeAsWarning )
94+ Log . LogWarning ( message ) ;
95+ else
96+ Log . LogMessage ( MessageImportance . Normal , message ) ;
9297 } catch {
9398 throw ;
9499 } finally {
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ public class CheckAdbTarget : Adb
3131
3232 public override bool Execute ( )
3333 {
34+ // Log messages as output rather than warnings
35+ WriteOutputAsMessage = true ;
36+
3437 base . Execute ( ) ;
3538
3639 // We always succeed
@@ -43,12 +46,14 @@ public override bool Execute ()
4346 new CommandInfo {
4447 ArgumentsString = $ "{ AdbTarget } shell getprop ro.build.version.sdk",
4548 IgnoreExitCode = true ,
49+ LogIgnoredExitCodeAsWarning = false ,
4650 MergeStdoutAndStderr = false ,
4751 } ,
4852
4953 new CommandInfo {
5054 ArgumentsString = $ "{ AdbTarget } shell pm path com.android.shell",
5155 IgnoreExitCode = true ,
56+ LogIgnoredExitCodeAsWarning = false ,
5257 MergeStdoutAndStderr = false ,
5358 ShouldRun = ( ) => IsValidTarget
5459 } ,
You can’t perform that action at this time.
0 commit comments