@@ -101,19 +101,24 @@ protected string GetSdkPlatform (bool isSimulator)
101101
102102 protected System . Threading . Tasks . Task < Execution > ExecuteAsync ( string fileName , IList < string > arguments , Dictionary < string , string ? > ? environment = null , bool mergeOutput = true , bool showErrorIfFailure = true , string ? workingDirectory = null , CancellationToken ? cancellationToken = null )
103103 {
104- return ExecuteAsync ( Log , fileName , arguments , SdkDevPath , environment , mergeOutput , showErrorIfFailure , workingDirectory , cancellationToken ) ;
104+ return ExecuteAsync ( this , Log , fileName , arguments , SdkDevPath , environment , mergeOutput , showErrorIfFailure , workingDirectory , cancellationToken ) ;
105105 }
106106
107107 static int executionCounter ;
108108 internal protected static async System . Threading . Tasks . Task < Execution > ExecuteAsync ( TaskLoggingHelper log , string fileName , IList < string > arguments , string ? sdkDevPath = null , Dictionary < string , string ? > ? environment = null , bool mergeOutput = true , bool showErrorIfFailure = true , string ? workingDirectory = null , CancellationToken ? cancellationToken = null )
109+ {
110+ return ExecuteAsync ( null , log , fileName , arguments , SdkDevPath , environment , mergeOutput , showErrorIfFailure , workingDirectory , cancellationToken ) ;
111+ }
112+
113+ internal protected static async System . Threading . Tasks . Task < Execution > ExecuteAsync ( Task ? task , TaskLoggingHelper log , string fileName , IList < string > arguments , string ? sdkDevPath = null , Dictionary < string , string ? > ? environment = null , bool mergeOutput = true , bool showErrorIfFailure = true , string ? workingDirectory = null , CancellationToken ? cancellationToken = null )
109114 {
110115 // Create a new dictionary if we're given one, to make sure we don't change the caller's dictionary.
111116 var launchEnvironment = environment is null ? new Dictionary < string , string ? > ( ) : new Dictionary < string , string ? > ( environment ) ;
112117 if ( ! string . IsNullOrEmpty ( sdkDevPath ) )
113118 launchEnvironment [ "DEVELOPER_DIR" ] = sdkDevPath ;
114119
115120 if ( string . IsNullOrEmpty ( sdkDevPath ) )
116- log . LogError ( $ "Calling external processes without specifying the Xcode path! StackTrace: { Environment . StackTrace } ") ;
121+ log . LogError ( $ "Calling external processes without specifying the Xcode path in the task { ( task ? . GetType ( ) ? . Name ?? "?" ) } ! StackTrace: { Environment . StackTrace } ") ;
117122
118123 var currentId = Interlocked . Increment ( ref executionCounter ) ;
119124 log . LogMessage ( MessageImportance . Normal , MSBStrings . M0001 , currentId , fileName , StringUtils . FormatArguments ( arguments ) ) ; // Started external tool execution #{0}: {1} {2}
0 commit comments