If I have a line like the below in an .erb:
TMP_DIR=$(mktemp -d <%= @temp_dir %>/tmp_dir.XXXXXX)
Is there a way I can get Chef to fail, or at least report, if the @temp_dir variable is undefined?
Ideally I'd like to do this with a single call at the top of the recipe, or at the command line with a config option (I'm using chef-client).
Thanks ahead!