diff --git a/README.md b/README.md index 75c463a..ab3dcba 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ create -n "My Project" -d "A short pitch" -i 4 -c 3 -e 5 -r 2 -f 3 create --name "My Project" --impact 4 ``` -Scores given as options are used as they are rather than averaged; a score outside 1-5 is rejected with `All scores must be between 1 and 5.` before any question is asked, and nothing is saved. A name already in use is rejected before any further question is asked, and an empty or whitespace-only name or description stops creation without saving anything. +Scores given as options are used as they are rather than averaged; a score outside 1-5 is rejected with `All scores must be between 1 and 5.` before any question is asked, and nothing is saved. A name already in use is rejected with `Project name '' is already taken. Please choose a different name.` before any further question is asked. An empty or whitespace-only name or description stops creation without saving anything, printing `Project name cannot be empty.` or `Project description cannot be empty.` ### List Examples ```bash @@ -159,7 +159,16 @@ update "My Project" --impact 5 --effort 2 update "My Project" -c 4 -r 3 ``` -`update` accepts `--description` (`-d`), `--impact` (`-i`), `--confidence` (`-c`), `--ease` (`-e`), `--reach` (`-r`) and `--effort` (`-f`), and at least one of them must be given. The change is saved to `projects.json` immediately and the project keeps its place in creation order; the new ICE and RICE scores are printed. If no project has the given name, `update` reports `Project not found: `; an empty or whitespace-only description, or a score outside 1-5, is rejected and nothing is changed. If `projects.json` cannot be written, `update` reports `An error occurred while updating the project: ` and nothing is changed. A project cannot be renamed with `update`. +`update` accepts `--description` (`-d`), `--impact` (`-i`), `--confidence` (`-c`), `--ease` (`-e`), `--reach` (`-r`) and `--effort` (`-f`), and at least one of them must be given. The change is saved to `projects.json` immediately and the project keeps its place in creation order; the new ICE and RICE scores are printed. If no project has the given name, `update` reports `Project not found: `. + +These options are checked before the project is looked up, and any problem stops `update` with nothing changed: +- No option given: `Nothing to update. Provide at least one of --description, --impact, --confidence, --ease, --reach or --effort.` +- An empty or whitespace-only description: `Project description cannot be empty.` +- A score outside 1-5: `All scores must be between 1 and 5.` + +Because the options are checked first, `update` with no options reports `Nothing to update` even for a name no project has. + +If `projects.json` cannot be written, `update` reports `An error occurred while updating the project: ` and nothing is changed. A project cannot be renamed with `update`. ### Delete Examples ```bash