Update PowerShell scripts to use consistent two-character options (Part 1)
🔄 PowerShell Option Consistency - Phase 1 Complete: ✅ Updated Scripts: - sf-deploy.ps1: -to, -sr, -dr, -ts, -hp (matches Bash) - sf-dry-run.ps1: -to, -sr, -dr, -ts, -hp (matches Bash) - sf-web-open.ps1: -to, -pt, -ur, -hp (matches Bash) - sf-check.ps1: -vb, -hp (matches Bash) - sf-org-create.ps1: -al, -dd, -df, -st, -tp, -hp (matches Bash) 🎯 Consistency Achieved: - All parameter names now match their Bash counterparts exactly - Help text updated with descriptive option names - Examples updated to show new two-character options - All validation logic updated to use new parameter names 🚀 Cross-Platform Alignment: - PowerShell and Bash scripts now have identical option schemes - Users get consistent experience across platforms - No more confusion between single-char and two-char options Remaining: 7 more PowerShell scripts to update for full consistency.
This commit is contained in:
18
sf-check.ps1
18
sf-check.ps1
@@ -1,6 +1,6 @@
|
||||
param(
|
||||
[switch]$v,
|
||||
[switch]$h
|
||||
[switch]$vb,
|
||||
[switch]$hp
|
||||
)
|
||||
|
||||
function Show-Help {
|
||||
@@ -8,11 +8,11 @@ function Show-Help {
|
||||
sf-check.ps1 — verify Salesforce CLI environment and configuration
|
||||
|
||||
USAGE:
|
||||
sf-check.ps1 [-v] [-h]
|
||||
sf-check.ps1 [-vb] [-hp]
|
||||
|
||||
OPTIONS:
|
||||
-v Verbose output (show detailed information)
|
||||
-h Show this help
|
||||
-vb Verbose output (show detailed information)
|
||||
-hp Help - show this help
|
||||
|
||||
DESCRIPTION:
|
||||
This script verifies that the Salesforce CLI is properly installed and configured.
|
||||
@@ -24,7 +24,7 @@ DESCRIPTION:
|
||||
|
||||
EXAMPLES:
|
||||
sf-check.ps1 # Basic environment check
|
||||
sf-check.ps1 -v # Verbose output with detailed information
|
||||
sf-check.ps1 -vb # Verbose output with detailed information
|
||||
"@
|
||||
}
|
||||
|
||||
@@ -276,13 +276,13 @@ function Test-Diagnostics {
|
||||
}
|
||||
|
||||
# Show help if requested
|
||||
if ($h) {
|
||||
if ($hp) {
|
||||
Show-Help
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Set verbose flag
|
||||
$Verbose = $v
|
||||
$Verbose = $vb
|
||||
|
||||
# Main execution
|
||||
function Main {
|
||||
@@ -328,7 +328,7 @@ function Main {
|
||||
|
||||
if (-not $Verbose) {
|
||||
Write-Host ""
|
||||
Write-Host "Run 'sf-check.ps1 -v' for detailed system information."
|
||||
Write-Host "Run 'sf-check.ps1 -vb' for detailed system information."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user