Skip to content

Commit e05ff6f

Browse files
Updated PSLIB_InvalidPattern0 to be more readable (#876)
* Updated PSLIB_InvalidPattern0 to be more readable * Update LegacyFindFunctions.ps1 Co-authored-by: Kirill Ivlev <[email protected]>
1 parent 22ba7dd commit e05ff6f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

powershell/VstsTaskSdk/LegacyFindFunctions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function Find-Files {
132132
}
133133

134134
# Validate pattern does not end with a \.
135-
if ($pattern[$pattern.Length - 1] -eq [System.IO.Path]::DirectorySeparatorChar) {
135+
if ($pattern.EndsWith([System.IO.Path]::DirectorySeparatorChar)) {
136136
throw (Get-LocString -Key PSLIB_InvalidPattern0 -ArgumentList $pattern)
137137
}
138138

powershell/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Enumerating subdirectories failed for path: '{0}'",
77
"loc.messages.PSLIB_FileNotFound0": "File not found: '{0}'",
88
"loc.messages.PSLIB_Input0": "'{0}' input",
9-
"loc.messages.PSLIB_InvalidPattern0": "Invalid pattern: '{0}'",
9+
"loc.messages.PSLIB_InvalidPattern0": "Path cannot end with a directory separator character: '{0}'",
1010
"loc.messages.PSLIB_LeafPathNotFound0": "Leaf path not found: '{0}'",
1111
"loc.messages.PSLIB_PathLengthNotReturnedFor0": "Path normalization/expansion failed. The path length was not returned by the Kernel32 subsystem for: '{0}'",
1212
"loc.messages.PSLIB_PathNotFound0": "Path not found: '{0}'",
@@ -15,4 +15,4 @@
1515
"loc.messages.PSLIB_StringFormatFailed": "String format failed.",
1616
"loc.messages.PSLIB_StringResourceKeyNotFound0": "String resource key not found: '{0}'",
1717
"loc.messages.PSLIB_TaskVariable0": "'{0}' task variable"
18-
}
18+
}

0 commit comments

Comments
 (0)