Skip to content

Commit 650f654

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

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

main.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,22 @@ 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>")
6060
}
6161

6262
// WinSCP's ini file mode.
63-
fmt.Println("\n\nWinSCP.ini:")
63+
fmt.Println("\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)