File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313### Builds
1414
1515- ** auto-pr:** Add ` CommitMessageFormat ` option ([ #5171 ] ( https://github.com/ScoopInstaller/Scoop/issues/5171 ) )
16+ - ** checkver:** Support XML default namespace ([ #5191 ] ( https://github.com/ScoopInstaller/Scoop/issues/5191 ) )
1617
1718## [ v0.3.0] ( https://github.com/ScoopInstaller/Scoop/compare/v0.2.4...v0.3.0 ) - 2022-10-10
1819
Original file line number Diff line number Diff line change @@ -310,12 +310,17 @@ while ($in_progress -gt 0) {
310310 # Then add them into the NamespaceManager
311311 $nsmgr = New-Object System.Xml.XmlNamespaceManager($xml.NameTable )
312312 $nsList | ForEach-Object {
313- $nsmgr.AddNamespace ($_.LocalName , $_.Value )
313+ if ($_.LocalName -eq ' xmlns' ) {
314+ $nsmgr.AddNamespace (' ns' , $_.Value )
315+ $xpath = $xpath -replace ' /([^:/]+)((?=/)|(?=$))' , ' /ns:$1'
316+ } else {
317+ $nsmgr.AddNamespace ($_.LocalName , $_.Value )
318+ }
314319 }
315320 # Getting version from XML, using XPath
316321 $ver = $xml.SelectSingleNode ($xpath , $nsmgr ).' #text'
317322 if (! $ver ) {
318- next " couldn't find '$xpath ' in $url "
323+ next " couldn't find '$ ( $ xpath -replace ' ns: ' , ' ' ) ' in $url "
319324 continue
320325 }
321326 }
You can’t perform that action at this time.
0 commit comments