Skip to content

Commit 764d30f

Browse files
fix: use a more generic powershell error fragment for Windows probing (#2)
Closes coder/internal#566 Very very funny to me that someone at Microsoft changed this error message, especially the "a name" <=> "the name". File sync working: ![image](https://github.com/user-attachments/assets/1901d00b-f8a4-489c-8b99-b9e62ea7e1fd)
1 parent e72b7b9 commit 764d30f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/process/errors.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ const (
2323
// windowsPowershellCommandNotFoundFragment is a fragment of the error output
2424
// returned on Windows systems running Powershell when a command cannot be
2525
// found.
26-
windowsPowershellCommandNotFoundFragment = "is not recognized as the name of a cmdlet, function, script file, or operable program."
26+
// Different Windows versions use slightly error messages.
27+
// i.e. "is not recognized as the name of a cmdlet, function, script file, or operable program."
28+
// "is not recognized as a name of a cmdlet, function, script file, or executable program."
29+
windowsPowershellCommandNotFoundFragment = "cmdlet, function, script file, or"
2730
)
2831

2932
// OutputIsPOSIXCommandNotFound returns whether or not a process' error output

0 commit comments

Comments
 (0)