Skip to content

Commit 7ea1598

Browse files
committed
If extraction of working dir path from a filepath fails, default to the current working dir for the process. This should be rare - only when user provides a bad cwd or program path.
1 parent a23c99e commit 7ea1598

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/PowerShellEditorServices.Protocol/Server/DebugAdapter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ protected async Task HandleLaunchRequest(
8888
catch (Exception ex)
8989
{
9090
Logger.Write(LogLevel.Error, "cwd path is bad: " + ex.Message);
91+
workingDir = Environment.CurrentDirectory;
9192
}
9293

9394
var setWorkingDirCommand = new PSCommand();

0 commit comments

Comments
 (0)