| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…s in path or not using wildcards in the path.
|
If we want unambiguity, can we follow the practice we use in cmdlets? I mean that if name resolution returns several results, then throw. |
Sorry, something went wrong.
|
Ilya (@iSazonov) That code is already there. End the end, both code paths, use the same code. I doubt anyone actually wants to do execution based on wildcards. It can lead to executing unexpected files and VERY bad results. |
Sorry, something went wrong.
|
Glad to see this is getting fixed; it addresses at least part of #4726, which also asks for the >, >> behavior to be fixed - will this PR address that too (haven't looked)? |
Sorry, something went wrong.
|
Michael Klement (@mklement0) The intent was not to fix that issue. As #4726 does not directly affect execution, I would not think that the issue would be considered a Defense in Depth fix and I'd prefer to get this fix in before addressing that issue. |
Sorry, something went wrong.
|
Thanks for clarifying, Travis Plunk (@TravisEz13) (but note that #4726 is about execution as well). |
Sorry, something went wrong.
There was a problem hiding this comment.
Nit comment remaining
Sorry, something went wrong.
| [string]$Title = 'PowerShell Core Tests' | ||
| [string]$Title = 'PowerShell Core Tests', | ||
| [Parameter(ParameterSetName='Wait', Mandatory=$true, | ||
| HelpMessage='Wait for the debugger to attach to powershell before pester starts. Debug builds only!')] |
There was a problem hiding this comment.
| HelpMessage='Wait for the debugger to attach to powershell before pester starts. Debug builds only!')] | |
| HelpMessage='Wait for the debugger to attach to PowerShell before Pester starts. Debug builds only!')] |
Sorry, something went wrong.
|
Should we document the command searcher process in Docs repo? |
Sorry, something went wrong.
|
The command searcher itself is an implementation detail. We should document the search order for command execution. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Make command searcher not use wildcard search for execution
PR Context
This is a Defense in Depth fix to prevent people from accidentally running a script.
For example, if a user attempted to run .\[my1].ps1 and there is a 1.ps1 in the same folder. 1.ps1 would be executed instead.
The fix allows tab completion and Get-Command to continue to work with the wildcards ([], ?, and *).
PR Checklist