Skip to content
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

Need Graceful Response if executing PlatyPS commands from non-FileSystem provider #161

Closed
jongeller opened this issue Jun 28, 2016 · 7 comments
Assignees
Milestone

Comments

@jongeller
Copy link
Contributor

discovered this when trying to run PlatyPS on the SQLPS module for SQL server. Part of getting the commands moves the runtime over to the SQL provider, PlatyPS fails dramatically at this point.

To Reproduce

Set-Location HKLM: #this puts you on a provider outside of the filesystem (registry)
New-ExternalHelp -Path <MdFilePath> -Output <outputPath>

Expected behavior

You get the help.xml (external help) expected.

Actual behavior

Get-MarkdownMetadata : Cannot bind argument to parameter 'Markdown' because it is an empty string.
At D:\GitHub Repos\platyPS\out\platyPS\platyPS.psm1:1155 char:48
+     $metadata = Get-MarkdownMetadata -markdown $markdown
+                                                ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-MarkdownMetadata], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Get-MarkdownMetadata

Environment data

PlatyPS v0.5.0
Windows 10
PowerShell 5.0

@jongeller jongeller self-assigned this Jun 28, 2016
@jongeller jongeller added this to the 1.0.0 milestone Jun 28, 2016
@jongeller jongeller added the bug label Jun 28, 2016
@vors vors removed this from the 1.0.0 milestone Jul 20, 2016
@vors
Copy link
Collaborator

vors commented Jul 20, 2016

That blocks SQLPS help migration, because you can only run these command from the SQL provider.

@vors vors added this to the 0.7.0 milestone Jul 20, 2016
@sankethka sankethka removed this from the 0.7.0 milestone Jul 20, 2016
@vors
Copy link
Collaborator

vors commented Jul 20, 2016

This is actually applicable to New-ExternalHelp

@sankethka sankethka added this to the 0.7.0 milestone Jul 20, 2016
@jongeller
Copy link
Contributor Author

resolved in e07fd67 - waiting for build to pass, then will merge into master along with other minor fixes.

@jongeller
Copy link
Contributor Author

fixed tests in 0a5c56b will merge in to master on build test completion.

@jongeller
Copy link
Contributor Author

jongeller commented Aug 3, 2016

one build error remains. working on it now. it does not exist locally.

@jongeller
Copy link
Contributor Author

This issue is now also a fix, if the file system provider in not in use. PlatyPS will change providers to the first available file system. This means C: will typically be the preferred drive. 6db781e

@jongeller jongeller changed the title Need Graceful Failure if executing PlatyPS commands from non-FileSystem provider Need Graceful Response if executing PlatyPS commands from non-FileSystem provider Aug 4, 2016
jongeller added a commit that referenced this issue Aug 4, 2016
Merging in changes for issues #161 and #174
@jongeller
Copy link
Contributor Author

merged into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants