Skip to content

Commit 7078073

Browse files
committed
Fixed compilation error.
1 parent 644e9ab commit 7078073

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,7 @@ private EditorServicesConfig CreateConfigObject()
351351
var profile = (PSObject)GetVariableValue("profile");
352352

353353
var hostInfo = new HostInfo(HostName, HostProfileId, HostVersion);
354-
// This ensures that all Runspaces are created with the same InitialSessionState as the runspace that started EditorServices
355-
var initialSessionState = Runspace.DefaultRunspace.InitialSessionState;
354+
var initialSessionState = InitialSessionState ?? Runspace.DefaultRunspace.InitialSessionState;
356355
var editorServicesConfig = new EditorServicesConfig(hostInfo, Host, SessionDetailsPath, bundledModulesPath, LogPath)
357356
{
358357
FeatureFlags = FeatureFlags,

0 commit comments

Comments
 (0)