mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Use simple match instead of regex match
This commit is contained in:
parent
d3ef2e393b
commit
84b403fd02
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user