#!/usr/bin/env bash

source "$rvm_scripts_path/base"

environment_file_path="$rvm_environments_path/$(__rvm_env_string)"
# Echo the path or environment file.
if
  [[ "$rvm_path_flag" == "1" || "$*" =~ "--path" ]]
then
  echo "$environment_file_path"
elif
  [[ "$rvm_cron_flag" == "1" || "$*" =~ "--cron" ]]
then
  \cat "$environment_file_path" |
    __rvm_grep -Eo "[^ ]+=[^;]+" |
    __rvm_sed -e 's/\$PATH/'"${PATH//\//\/}"'/' -e 's/\${PATH}/'"${PATH//\//\/}"'/'
else
  \cat "$environment_file_path"
fi
