From 7d74d8e92e0b90755d2d2d22d649ef76b0be76c7 Mon Sep 17 00:00:00 2001 From: HunJerBAH Date: Tue, 24 Sep 2024 12:43:03 -0400 Subject: [PATCH] updated attribute conditional logic for git clean pr command --- git-commands/git-clean-pr | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/git-commands/git-clean-pr b/git-commands/git-clean-pr index f20f3d14d43..5b14f29b923 100755 --- a/git-commands/git-clean-pr +++ b/git-commands/git-clean-pr @@ -92,19 +92,26 @@ if [[ ! -z "$jsxCommits" || ! -z "$jsCommits" ]]; then echo "running jest tests for $jsCommits"; echo ""; # use SCRIPT_DIR to get to appeals/client/test cd "$SCRIPT_DIR" + cd ../client + # check for autofix option in parameters # run -o for autofix jest and update snapshots for var in "$@" do if [ "$var" == "autofix" ]; then - cd ../client && yarn jest $var + yarn jest $var yarn jest --updateSnapshot - else - cd ../client && yarn jest + else + yarn jest fi done + if [ $# -eq 0 ] + then + yarn jest + fi + # run lint:fix yarn run lint:fix