Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit eaefb1d

Browse files
Simplifying path expression
1 parent 29b418d commit eaefb1d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/GitHub.Api/Platform/DefaultEnvironment.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ public NPath NodeJsExecutablePath
142142
{
143143
if (!nodeJsExecutablePath.IsInitialized)
144144
{
145-
nodeJsExecutablePath = IsWindows
146-
? UnityApplicationContents.Combine("Tools", "nodejs", "node.exe")
147-
: UnityApplicationContents.Combine("Tools", "nodejs", "node");
145+
nodeJsExecutablePath =
146+
UnityApplicationContents.Combine("Tools", "nodejs", "node" + ExecutableExtension);
148147
}
149148

150149
return nodeJsExecutablePath;
@@ -209,7 +208,7 @@ public static bool OnMac
209208
}
210209
set { onMac = value; }
211210
}
212-
public string ExecutableExtension { get { return IsWindows ? ".exe" : null; } }
211+
public string ExecutableExtension { get { return IsWindows ? ".exe" : string.Empty; } }
213212
protected static ILogging Logger { get; } = LogHelper.GetLogger<DefaultEnvironment>();
214213
}
215214
}

0 commit comments

Comments
 (0)