Skip to content

Commit 76a01d9

Browse files
committed
fixes: correct text displayed for how to use haystack command
Signed-off-by: deadprogram <[email protected]>
1 parent 66dd953 commit 76a01d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The keys will be saved in a file named `DEVICENAME.keys` and the configuration f
119119
For example:
120120

121121
```shell
122-
haystack flash nano-rp2040 DEVICENAME
122+
haystack flash DEVICENAME nano-rp2040
123123
```
124124

125125
This will use TinyGo to compile the firmware using your keys, and then flash it to the device. See [https://tinygo.org/getting-started/overview/](https://tinygo.org/getting-started/overview/) for more information about TinyGo.

cmd/haystack/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616

1717
args := flag.Args()
1818
if len(args) < 1 {
19-
fmt.Println("either 'keys' 'flash' or 'scan' subcommand is required.", len(args))
19+
fmt.Println("subcommand required. valid subcommands are 'keys' 'flash' 'scan'")
2020
return
2121
}
2222

@@ -31,7 +31,7 @@ func main() {
3131
}
3232
case "flash":
3333
if len(args) < 3 {
34-
fmt.Println("Please provide a device target and name")
34+
fmt.Println("Please provide a device name and target")
3535
return
3636
}
3737
if err := flashDevice(args[1], args[2], verboseFlag); err != nil {
@@ -42,7 +42,7 @@ func main() {
4242
fmt.Println("failed to scan devices:", err)
4343
}
4444
default:
45-
fmt.Println("either 'keys' or 'flash' subcommand is required.")
45+
fmt.Println("subcommand required. valid subcommands are 'keys' 'flash' 'scan'")
4646
return
4747
}
4848
}

0 commit comments

Comments
 (0)