Skip to content

Commit 092b95f

Browse files
author
anamnavi
committed
fix condition for path separator to account for module prefix scenarios for container registries
1 parent 5e91d82 commit 092b95f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/code/Utils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ public static string[] ProcessNameWildcards(
196196
isContainWildcard = true;
197197
namesWithSupportedWildcards.Add(name);
198198
}
199-
else if(name.Contains("/") || name.Contains("\\"))
199+
else if(name.StartsWith("/") || name.StartsWith("\\"))
200200
{
201-
errorMsgsList.Add(String.Format("-Name with path separator '/' or '\\' is not supported for this cmdlet so Name entry: '{0}' will be discarded.", name));
201+
errorMsgsList.Add(String.Format("-Name starting with path separator '/' or '\\' is not supported for this cmdlet so Name entry: '{0}' will be discarded.", name));
202202
continue;
203203
}
204204
else

0 commit comments

Comments
 (0)