Skip to content

Commit 343bb14

Browse files
committed
add note about rd_fail usage, and using subshells
Signed-off-by: Zen <[email protected]>
1 parent e01be7c commit 343bb14

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@ bools to disable validation should be named in the format: `no_validate_<attr>`.
3838
* Check functions should be named in the format: `check_<attr>`.
3939
* Functions which move files into the build dir or image should be named `deploy_<thing>`.
4040
* Functions which update the exports should be named `export_<thing>`. such as `export_mount_info`.
41+
42+
### Failure modes
43+
44+
When the shell script fails, it should call `rd_fail` which then calls `rd_restart`.
45+
46+
`rd_restart` cannot function properly in a subshell, so any functions which could possibly use it should not be called through `$()` or similar. This causes the script to fail, but continue execution after the failure.
47+
48+

0 commit comments

Comments
 (0)