浏览代码

[style] Quote the `eval` argument to avoid accidental globbing.

Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
Fletcher Nichol 6 年之前
父节点
当前提交
943dadce8e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      renv.sh

+ 2 - 2
renv.sh

@@ -36,13 +36,13 @@ renv() {
         return 9
       fi
 
-      eval $(
+      eval "$(
         ruby -rubygems - <<-'EOF'
       puts "local ruby_engine=#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'}"
       puts "local ruby_version=#{RUBY_VERSION}"
       puts "local gem_path='#{Gem.path.join(':')}'"
 EOF
-      )
+      )"
       local gem_dir="$PWD/.gem/$ruby_engine/$ruby_version"
 
       export RENV_ORIG_PATH="$PATH"