1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-27 12:34:19 +03:00

Make receive instructions copypaste-able

This commit is contained in:
Ezequiel Rosas 2024-08-13 12:50:48 -06:00
parent 69af916d36
commit 1a43826308

View File

@ -648,7 +648,14 @@ func (c *Client) Send(filesInfo []FileInfo, emptyFoldersToTransfer []FileInfo, t
if c.Options.RelayPassword != models.DEFAULT_PASSPHRASE { if c.Options.RelayPassword != models.DEFAULT_PASSPHRASE {
flags.WriteString("--pass " + c.Options.RelayPassword + " ") flags.WriteString("--pass " + c.Options.RelayPassword + " ")
} }
fmt.Fprintf(os.Stderr, "Code is: %[1]s\nOn the other computer run\n\ncroc %[2]s%[1]s\n", c.Options.SharedSecret, flags.String()) fmt.Fprintf(os.Stderr, `Code is: %[1]s
On the other computer run:
(For Windows)
croc %[2]s%[1]s
(For Linux/OSX)
CROC_SECRET=%[1]q croc %[2]s
`, c.Options.SharedSecret, flags.String())
if c.Options.Ask { if c.Options.Ask {
machid, _ := machineid.ID() machid, _ := machineid.ID()
fmt.Fprintf(os.Stderr, "\rYour machine ID is '%s'\n", machid) fmt.Fprintf(os.Stderr, "\rYour machine ID is '%s'\n", machid)