Skip to content

Commit

Permalink
fix 'which' command to detect location of dotnet cli (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoC0de committed Feb 10, 2024
1 parent 0d302f6 commit 5c83956
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/NuGetForUnity/Editor/Helper/NugetCliHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private static string GetDotnetExecutablePath(Encoding outputEncoding)
using (var process = Process.Start(
new ProcessStartInfo("which", commandLineToolName)
{
RedirectStandardOutput = true, StandardOutputEncoding = outputEncoding,
RedirectStandardOutput = true, StandardOutputEncoding = outputEncoding, UseShellExecute = false,
}) ??
throw new InvalidOperationException("Failed to start process."))
{
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetForUnity/Editor/Ui/NugetWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace NugetForUnity.Ui
/// </summary>
public class NugetWindow : EditorWindow, ISerializationCallbackReceiver
{
private readonly StringBuilder cachedStringBuilder = new StringBuilder();

private readonly Dictionary<string, bool> foldouts = new Dictionary<string, bool>();

/// <summary>
Expand Down Expand Up @@ -73,8 +75,6 @@ public class NugetWindow : EditorWindow, ISerializationCallbackReceiver
/// </summary>
private List<INugetPackage> availablePackages = new List<INugetPackage>();

private readonly StringBuilder cachedStringBuilder = new StringBuilder();

/// <summary>
/// The currently selected tab in the window.
/// </summary>
Expand Down

0 comments on commit 5c83956

Please sign in to comment.