New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS Type provider type failed with Set-Location #73
Comments
By setting the parameter passThru to true it works fine. I don't know why when the parameter is not set the type change. Maybe a powershell dynamic type. |
Well looking at the Cmdlet OutputType (which we use to determine the type of the response), it reports that it should return one of these types: System.Management.Automation.PathInfo However when we look at the PassThru parameter doc we find that: "Returns a System.Management.Automation.PathInfo object that represents the location. By default, this cmdlet does not generate any output". My guess that this is fooling the type provider into trying to cast an invalid object when this is not set in this lines: FSharp.Management/src/FSharp.Management.PowerShell/HostedRuntime.fs Lines 131 to 132 in ad4164e
I believe i'll have a fix by tomorrow |
Cool! Many thanks! On Aug 19, 2016 3:37 PM, "Ezequiel Lewin" notifications@github.com wrote:
|
Thank you! On Aug 21, 2016 1:35 PM, "Sergey Tihon" notifications@github.com wrote:
|
Description
When use powershell type provider and set-location cmdlet, script fail with a type error
Repro steps
Set-Location fail with error :
Expected behavior
Maybe convert PS Custom Object to the right object. I know it is a little bit hard to infer powershell type result but with the version 0.3.1 it works with the option type
Actual behavior
Fail to convert expected type from ps custom object
Known workarounds
Revert to the version 0.3.1
Related information
The text was updated successfully, but these errors were encountered: