Sha256: c4746b753fc2777037162b8a474517c76de167db6d4e609641b27173af200cf8

Contents?: true

Size: 752 Bytes

Versions: 11

Compression:

Stored size: 752 Bytes

Contents

#!/usr/bin/env bash

# Recursive loops, oh my!
unset rvm_default_flag

source "$rvm_scripts_path/base"

usage() {
  printf "Usage: rvm env [ruby_string] [--path]\n"
}

environment_name="$1"

if [[ -z "$environment_name" ]]; then
  usage ; exit 1
fi

# Exit when we encounter an unknown environment name.
__rvm_become "$environment_name"

if [[ "$?" = 0 ]]; then
  __rvm_use
  environment_file_path="$rvm_environments_path/$(__rvm_environment_identifier)"
  # Echo the path or environment file.
  if [[ -n "$rvm_path_flag" ]]; then
    echo "$environment_file_path"
  else
    cat "$environment_file_path"
  fi
  unset environment_file_path
  result=0
else
  result=1
fi

unset rvm_ruby_string environment_name
__rvm_unset_ruby_variables

exit $result

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rvm-1.0.2 scripts/env
rvm-1.0.1 scripts/env
rvm-1.0.0 scripts/env
rvm-0.1.47 scripts/env
rvm-0.1.46 scripts/env
rvm-0.1.45 scripts/env
rvm-0.1.44 scripts/env
rvm-0.1.43 scripts/env
rvm-0.1.42 scripts/env
rvm-0.1.41 scripts/env
rvm-0.1.40 scripts/env