Skip to content

Commit

Permalink
[IMP] Harve: add option to specify the workdir
Browse files Browse the repository at this point in the history
done via the `HARVE_HOME` environment variable
  • Loading branch information
KangOl committed Oct 22, 2023
1 parent ccf834f commit 242b559
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Harve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ test "${DEBUG:-0}" != 0 && set -x
printf '%s\n%s\n' 2.23 "$(git --version | cut -d" " -f3)" | sort --check=quiet --version-sort || \
{ echo "ERROR: outdated git version. Git >= 2.23 is required." >&2; exit 1; }

workdir="${XDG_CACHE_HOME:-${HOME}/.cache}/Harve"
workdir="${HARVE_HOME:-}"
if [[ -z "$workdir" ]]; then
workdir="${XDG_CACHE_HOME:-${HOME}/.cache}/Harve"
fi

mkdir -p "$workdir"
venv="${workdir}/.venv"

Expand Down

0 comments on commit 242b559

Please sign in to comment.