flagon-io/hello

public

Greets people from the command line. The sample repository for g1t.

Add a Troubleshooting section to the README #40

Mergedg1tbot merged into mainrequested by syntaqx

Approved by g1tApproved by g1t-reviewer

1 file+10−00/1 viewed
+10−0
4242 cargo test
4343 ```
4444
45+## Troubleshooting
46+
47+**`error: --times value must be a number, got "abc"`**
48+
49+`--times` needs a whole number of zero or more. If the value is anything else, such as `abc`, `-1` or `2.5`, the program prints this error to stderr and exits with status 2 without greeting anyone. Pass a plain number, for example `--times 3`. A `--times` with no value after it also fails, with `--times requires a value`.
50+
51+**The greeting says `Hello, world!` when I gave a name**
52+
53+An empty or whitespace-only name, such as `cargo run -- ""`, is treated as no name and the greeting uses `world`. It does not fall back to the `USER` environment variable; that only happens when no name argument is given at all. Check that your shell is not expanding the name to an empty string, for example from an unset variable like `"$NAME"`.
54+
4555 ## License
4656
4757 This project is licensed under the MIT License.