When bootstrapping any sandbox container or virtual machine, we inject a couple of helper scripts. These functions assist you in setting up the environment, or when writing check scripts. You can view the currently available set of scripts here: https://github.com/instruqt/participant-host-bootstrap/tree/master/bootstrap/bin/functions.
fail-message script can be used to provide feedback to the learner when writing check scripts. The function will write a given string to
stdout, prefixed with
FAIL:. See Challenge check for more details on writing check scripts.
#!/bin/bash# checkecho "Checking the solution of the challenge"if [ !$EVERYTHING_WENT_WELL ]; thenfail-message "Your challenge failed because of [REASON]"# which is equivalent toecho "FAIL: Your challenge failed because of [REASON]"exit 1fi
set-workdir script can be used to change the active working directory for a terminal tab.