Skip to content

Commit 896077a

Browse files
authored
Fix Start-AIShell to correctly get the executable path from PATH env variable (#272)
1 parent 0e2def5 commit 896077a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shell/AIShell.Integration/Commands/StartAishCommand.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ protected override void BeginProcessing()
1616
{
1717
if (Path is null)
1818
{
19-
Path = "aish";
20-
if (SessionState.InvokeCommand.GetCommand(Path, CommandTypes.Application) is null)
19+
var app = SessionState.InvokeCommand.GetCommand("aish", CommandTypes.Application);
20+
if (app is null)
2121
{
2222
ThrowTerminatingError(new(
2323
new NotSupportedException("The executable 'aish' cannot be found."),
2424
"AIShellMissing",
2525
ErrorCategory.NotInstalled,
2626
targetObject: null));
2727
}
28+
29+
Path = app.Source;
2830
}
2931
else
3032
{

0 commit comments

Comments
 (0)