-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Show-Karma -Contemplate breaks after Classes #467
Comments
Woah, that is a weird one. Can you try |
I did find the Reset CmdLet AboutClasses.Koans.ps1.txt After Reset, it now is back to normal: Still contemplating, will report back once |
Looks OK now. |
Thanks! @indented-automation have you seen that happen before, by any chance? |
❯ show-Karma -Contemplate
Resolve-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Users\David\Documents\WindowsPowerShell\Modules\PSKoans\0.67.1\Public\Show-Karma.ps1:124 char:50
+ '"{0}":{1}' -f (Resolve-Path $FilePath), $LineNum ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Resolve-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ResolvePath
Command that still is there... and now the AboutXML.ps1 is broken again. weird. |
Any chance you can share your library? Reset is quite difficult if the file it's attempting to reset has syntax errors. It's reliant on AST to parse, locate, and replace parts. Resetting the entire file should be more successful. Would need a sample to debug it though. |
Can do, what do you need and how/where should I upload it? |
Now that I have started to work on XMLs and read it, I think I might have a clue as to why it breaks, maybe even a hint to resolve it: <documentRoot>
<element>This is still a short XML file</element>
</documentRoot> This is present in the file here: It 'is much faster to use the Load method of XmlDocument for large files' {
Set-Content -Path $path -Value @'
<documentRoot>
<element>This is still a short XML file</element>
</documentRoot>
'@ does It 'can convert output from Get-Content to an XML document' {
<#
It is often desirable to read an XML file to work with in PowerShell.
Get-Content is often used to read XML content in as text.
#>
$path = Join-Path -Path $TestDrive -ChildPath document.xml
Set-Content -Path $path -Value @'
<documentRoot>
<element>A short XML file</element>
</documentRoot>
'@ |
ok. this works now for me The current I think also would resolve this:
Closing :) |
Glad you got it sorted! We should probably fix this as well, so reopening for now until we get it sorted. Feel free to unsubscribe from the issue if you don't wanna need to get notifs for it in future. 💖 |
oh. I thought I close it, because I spotted that the fix (the |
Ah, you're right, good point. Looks like we just need to get that into a release of the module at some point. Cheers! 😁 |
Describe "Koan Bug, Issue, or Help Request"
Show-Karma breaks down after classes
Context "The Problematic Assertions"
Show-Karma -Contemplate
fails after ClassesContext "Your Attempts"
Context "Additional Information"
Did I now miss out on XML? Did something break here?
The text was updated successfully, but these errors were encountered: