Use -and instead of && in PowerShell completion script (#2204)

This commit is contained in:
Casey Rodarmor 2024-06-28 00:52:16 -07:00 committed by GitHub
parent 97c32e60ae
commit e07da79d40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -255,7 +255,7 @@ const POWERSHELL_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[(
r#"function Get-JustFileRecipes([string[]]$CommandElements) {
$justFileIndex = $commandElements.IndexOf("--justfile");
if ($justFileIndex -ne -1 && $justFileIndex + 1 -le $commandElements.Length) {
if ($justFileIndex -ne -1 -and $justFileIndex + 1 -le $commandElements.Length) {
$justFileLocation = $commandElements[$justFileIndex + 1]
}