🐉 Boss: orders misunderstood

Exercise 6 of 6 in chapter 11 · 340 XP · 5 objectives checked by tests

Topics covered: DebuggingConsole commandExit codesNon-interactive modeBatch processing

Pippin went over the tavern's commands to make them “more careful”. Since then:

Your mission

Four breakdowns, in three commands. Find them and fix them, without breaking anything else.

Your tools

The preview Console tab is the best playground: it runs exactly like a script, with nobody there to answer the questions, and it shows the exit code of each command.

app:inventaire
app:plat:ajouter "Dragon Grog" 6 --categorie Drinks
app:plat:ajouter "Free Water" 0 --categorie Drinks
app:registre:purger --dry-run --avant today -v

Tavern tip

A command has two audiences: the human, who reads the messages, and the script, which only looks at the exit code and at what changed in the database. Each of these breakdowns fools the second one, or both.