Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion PSReadLine/Prediction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ private static void UpdatePredictionClient(Runspace runspace, EngineIntrinsics e
if (s_pCurrentLocation is not null)
{
// Set the current location if it's a local Runspace. Otherwise, set it to null.
object path = runspace.RunspaceIsRemote ? null : engineIntrinsics.SessionState.Path.CurrentLocation;
object path = runspace is null || runspace.RunspaceIsRemote
? null
: engineIntrinsics?.SessionState.Path.CurrentLocation;
s_pCurrentLocation.SetValue(s_predictionClient, path);
}
}
Expand Down