Skip to content

Commit ab82f3e

Browse files
Fix windows help messages sended to non windows users
1 parent c643147 commit ab82f3e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

main.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ func PrintHelp() {
5151
fmt.Println("WinSCP stored password finder")
5252

5353
// WinSCP's password manual decryption mode.
54-
fmt.Println("Registry:")
55-
fmt.Println(" Open regedit and navigate to [HKEY_CURRENT_USER\\Software\\Martin Prikryl\\WinSCP 2\\Sessions] to get the hostname, username and encrypted password")
5654
if runtime.GOOS == "windows" {
55+
fmt.Println("Registry:")
56+
fmt.Println(" Open regedit and navigate to [HKEY_CURRENT_USER\\Software\\Martin Prikryl\\WinSCP 2\\Sessions] to get the hostname, username and encrypted password")
5757
fmt.Println(" Usage winscppasswd.exe <host> <username> <encrypted_password>")
5858
} else {
5959
fmt.Println(" Usage ./winscppasswd <host> <username> <encrypted_password>")
@@ -63,11 +63,10 @@ func PrintHelp() {
6363
fmt.Println("\n\nWinSCP.ini:")
6464
if runtime.GOOS == "windows" {
6565
fmt.Println(" Usage winscppasswd.exe ini [<filepath>]")
66+
fmt.Printf(" Default value <filepath>: %s\n", GetDefaultWinSCPIniFilePath())
6667
} else {
6768
fmt.Println(" Usage ./winscppasswd ini [<filepath>]")
6869
}
69-
fmt.Printf(" Default value <filepath>: %s\n", GetDefaultWinSCPIniFilePath())
70-
return
7170
}
7271

7372
// GetDefaultWinSCPIniFilePath obtains default WinSCP configuration file.

0 commit comments

Comments
 (0)