Skip to content

Commit efd0517

Browse files
committed
tweak
1 parent 9c815e8 commit efd0517

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,7 @@ public abstract class XamarinTask : Task, IHasSessionId, ICustomLogger {
2323

2424
public string TargetFrameworkMoniker { get; set; } = string.Empty;
2525

26-
string sdkDevPath = string.Empty;
27-
public string SdkDevPath {
28-
get {
29-
if (string.IsNullOrEmpty (sdkDevPath))
30-
Log.LogError ($"The task {GetType ().Name} requires 'SdkDevPath' to be set.\n{Environment.StackTrace}");
31-
return sdkDevPath;
32-
}
33-
set {
34-
sdkDevPath = value;
35-
}
36-
}
26+
public string SdkDevPath { get; set; } = string.Empty;
3727

3828
void VerifyTargetFrameworkMoniker ()
3929
{
@@ -122,8 +112,8 @@ internal protected static async System.Threading.Tasks.Task<Execution> ExecuteAs
122112
if (!string.IsNullOrEmpty (sdkDevPath))
123113
launchEnvironment ["DEVELOPER_DIR"] = sdkDevPath;
124114

125-
if (fileName == "xcrun" && string.IsNullOrEmpty (sdkDevPath))
126-
log.LogError ($"Calling xcrun without specifying the Xcode path! StackTrace: {Environment.StackTrace}");
115+
if (string.IsNullOrEmpty (sdkDevPath))
116+
log.LogError ($"Calling external processes without specifying the Xcode path! StackTrace: {Environment.StackTrace}");
127117

128118
var currentId = Interlocked.Increment (ref executionCounter);
129119
log.LogMessage (MessageImportance.Normal, MSBStrings.M0001, currentId, fileName, StringUtils.FormatArguments (arguments)); // Started external tool execution #{0}: {1} {2}

0 commit comments

Comments
 (0)