Returning ok
Return ok (on its own, or with other properties) correctly in every language. Time: 5 minutes.
ok is an ordinary boolean property, but it’s an important convention. Shell blocks generated by session capture always end by printing {"ok":true} and declare ok: boolean. The editor’s insertable examples include Return a successful result and Return ok and a property for every language.
If a block declares ok, the last line must include it as a boolean. The string "true" fails.
Command Prompt isn’t one of the workflow languages. To run a cmd.exe command, use a PowerShell block with the editor’s Run a Command Prompt command example. It runs the command through %ComSpec% and exits with the command’s failure code.
Each variant publishes ok: true and summary: "3 files cleaned".
Make the Bash version publish ok: false when a directory called logs doesn’t exist in the run’s working directory, without failing the block.