fix: review GATE A — reemplazo de contrasenas sin 3er operando y ANSI 5.1-compat
- wordpress/deploy.ps1: -replace no acepta tercer operando (count) en ninguna version de PS; bucle linea a linea (1a = root, 2a = MYSQL_PASSWORD) - los 4 deploy.ps1: escape ANSI con [char]27 en vez de backtick-e (incompatible con Windows PowerShell 5.1); guard solo con NO_COLOR
This commit is contained in:
1 parent
0d07146162
commit
6c3a594a14
4 files changed
+32
-13
No files matched your search
@@ -15,8 +15,10 @@ param(
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$Green = "`e[32m"; $Cyan = "`e[36m"; $Yellow = "`e[33m"; $Red = "`e[31m"; $Bold = "`e[1m"; $NC = "`e[0m"
|
||||
if ($env:NO_COLOR -or -not $PSStyle) {
|
||||
# Escape ANSI via [char]27 (compatible con Windows PowerShell 5.1 y PS 7+)
|
||||
$Esc = [char]27
|
||||
$Green = "$Esc[32m"; $Cyan = "$Esc[36m"; $Yellow = "$Esc[33m"; $Red = "$Esc[31m"; $Bold = "$Esc[1m"; $NC = "$Esc[0m"
|
||||
if ($env:NO_COLOR) {
|
||||
$Green = $Cyan = $Yellow = $Red = $Bold = $NC = ''
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user