-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues
Milestone
Description
Steps to reproduce
To fix this issue, a possible solution is to wrap the call in cmd.exe “start...”; however, in order to figure out if the process fail to start, we need WaitForExit, then check the exit code, and extract the standard error. This is a change on behavior between Full and CoreCLR PowerShell. The problem with this implementation is that PowerShell will be blocked until the process completes. Alternatively, if we decide to just ignore the error, then this behavior will also be incorrect since in PowerShell no error means the operation was successful.
We should explore doing a PInvoke in Windows CoreCLR. This way, we can get the Marshal.GetLastWin32Error() if we fail to start the process.
on Windows Core CLR
invoke-item path_to_file_or_exe
Expected behavior
Actual behavior
Environment data
> $PSVersionTable
Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues