Improve sf-org-info.ps1 user experience by showing help when no parameters provided

- Modified script to automatically display help when run without any parameters
- This prevents the confusing error message that occurred when no default org was set
- Users now get clear usage information instead of a command failure
- Script still works correctly when any parameter is provided (-to, -list, -limits, -ve, -hp)
This commit is contained in:
Reynold Lariza
2025-08-28 21:33:15 +08:00
parent 2daff4f56b
commit 57eb6182c8

View File

@@ -43,8 +43,8 @@ param(
[switch]$hp [switch]$hp
) )
# Show help if requested # Show help if requested or if no parameters provided
if ($hp) { if ($hp -or (-not $to -and -not $limits -and -not $list -and -not $ve)) {
Get-Help $MyInvocation.MyCommand.Path -Detailed Get-Help $MyInvocation.MyCommand.Path -Detailed
exit 0 exit 0
} }