Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libexec/Renv
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ shopt -u nullglob
command="$1"
case "$command" in
"" | "-h" | "--help" )
echo -e "Renv 0.3.0\n$(Renv-help)" >&2
echo -e "Renv 0.3.1\n$(Renv-help)" >&2
;;
* )
command_path="$(command -v "Renv-$command" || true)"
Expand Down
7 changes: 7 additions & 0 deletions libexec/Renv-version-name
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ if [ -z "$RENV_VERSION" ]; then
RENV_VERSION="$(Renv-version-file-read "$RENV_VERSION_FILE" || true)"
fi

OLDIFS="$IFS"
IFS=$'\n' scripts=(`Renv-hooks version-name`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done

if [ -z "$RENV_VERSION" ] || [ "$RENV_VERSION" = "system" ]; then
echo "system"
exit
Expand Down
13 changes: 12 additions & 1 deletion libexec/Renv-version-origin
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
set -e
[ -n "$RENV_DEBUG" ] && set -x

if [ -n "$RENV_VERSION" ]; then
unset RENV_VERSION_ORIGIN

OLDIFS="$IFS"
IFS=$'\n' scripts=(`Renv-hooks version-origin`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do
source "$script"
done

if [ -n "$RENV_VERSION_ORIGIN" ]; then
echo "$RENV_VERSION_ORIGIN"
elif [ -n "$RENV_VERSION" ]; then
echo "RENV_VERSION environment variable"
else
Renv-version-file
Expand Down