From 84b403fd0282fc05bcf6efab9f874b6886c1a33e Mon Sep 17 00:00:00 2001 From: Mauricio Poppe Date: Tue, 9 Nov 2021 05:09:18 +0000 Subject: [PATCH] Use simple match instead of regex match --- cluster/gce/windows/testonly/install-ssh.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/gce/windows/testonly/install-ssh.psm1 b/cluster/gce/windows/testonly/install-ssh.psm1 index bc4fcf8ccc5..1e94475f1ab 100644 --- a/cluster/gce/windows/testonly/install-ssh.psm1 +++ b/cluster/gce/windows/testonly/install-ssh.psm1 @@ -241,11 +241,11 @@ while($true) { # https://github.com/PowerShell/Win32-OpenSSH/wiki/Various-Considerations # # these files will be append only, only new keys will be added - $found = Select-String -Path $user_keys_file -Pattern $ssh_key + $found = Select-String -Path $user_keys_file -Pattern $ssh_key -SimpleMatch if ($found -eq $null) { Add-Content -Encoding UTF8 $user_keys_file $ssh_key } - $found = Select-String -Path $administrator_keys_file -Pattern $ssh_key + $found = Select-String -Path $administrator_keys_file -Pattern $ssh_key -SimpleMatch if ($found -eq $null) { Add-Content -Encoding UTF8 $administrator_keys_file $ssh_key }