Sha256: 9f781e3cb6ff1c02e72d89f6176b961aa30cbb3f3159790c5cb63e5a7622074e

Contents?: true

Size: 778 Bytes

Versions: 23

Compression:

Stored size: 778 Bytes

Contents

#!/usr/bin/env bash

unset rvm_default_flag # Recursive loops, oh my!

source "$rvm_path/scripts/base"

usage()
{
  printf "
  Usage:

    rvm env [ruby_string] [--path]

"
}

args=($*)
environment_name="${args[0]}"

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_path/environments/$(__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

23 entries across 23 versions & 2 rubygems

Version Path
rvm-1.1.4 scripts/env
rvm-1.1.3 scripts/env
rvm-1.1.2 scripts/env
rvm-1.1.1 scripts/env
rvm-1.1.0 scripts/env
rvm-1.0.23 scripts/env
rvm-1.0.22 scripts/env
rvm-1.0.21 scripts/env
rvm-1.0.20 scripts/env
rvm-1.0.19 scripts/env
rvm-1.0.18 scripts/env
rvm-1.0.17 scripts/env
rvm-1.0.15 scripts/env
gemrage-1.0.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env
gemrage-0.4.1 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env
gemrage-0.4.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env
gemrage-0.3.2 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env
gemrage-0.3.1 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env
gemrage-0.3.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env
gemrage-0.2.0 vendor/ruby/1.8/gems/rvm-1.0.14/scripts/env