From 301b537f15fff6395d9fba19dc7c78f3dda33ae3 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Wed, 23 Mar 2016 19:16:21 -0500 Subject: [PATCH] Disable function calls if `YADM_TEST=1` This is to allow loading the functions only during tests. --- yadm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/yadm b/yadm index b37d638..559d841 100755 --- a/yadm +++ b/yadm @@ -499,6 +499,10 @@ function require_repo() { [ -d "$YADM_REPO" ] || error_out "Git repo does not exist. did you forget to run 'init' or 'clone'?" } -process_global_args "$@" -configure_paths -main "${MAIN_ARGS[@]}" +#; ****** Main processing (when not unit testing) ****** + +if [ "$YADM_TEST" != 1 ] ; then + process_global_args "$@" + configure_paths + main "${MAIN_ARGS[@]}" +fi