itamae-plugin-recipe-anyenv 0.3.36 → 0.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/itamae/plugin/recipe/anyenv.rb +7 -7
- data/lib/itamae/plugin/recipe/anyenv/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c564bbc78d44ed914633324f061c687895b780c
|
4
|
+
data.tar.gz: d34e6d70dd75d8384f67d3974b4702f3a32989e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 511428ff985b4c1d52f30e93170b9fb5b2066e90eb5a16f41445cfd85b73af1a46a5d2b1c7c53b7a643889f893e7667a57d8c7e930ed2737dbb462c3c0a0950a
|
7
|
+
data.tar.gz: 490cd784f1f2c89843c9aaba39e08ec1d145b4e95c0aa218936ea3e8368fb075ac811e2995ecc683f8836780695f5e22bef21d2385397edbeefd1fc3121300b7
|
@@ -25,9 +25,9 @@ end
|
|
25
25
|
def install_envs(attributes)
|
26
26
|
attributes[:install_versions].each do |envs|
|
27
27
|
envs.each do |env, vers|
|
28
|
-
|
28
|
+
install('anyenv', env)
|
29
29
|
|
30
|
-
|
30
|
+
vers.each { |ver| install(env, ver) }
|
31
31
|
|
32
32
|
global_version(env, vers.first)
|
33
33
|
end
|
@@ -35,7 +35,7 @@ def install_envs(attributes)
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def install(from, to)
|
38
|
-
execute anyenv_init_with("yes | #{from} install #{to};")
|
38
|
+
execute anyenv_init_with(@root_path, "yes | #{from} install #{to};")
|
39
39
|
end
|
40
40
|
|
41
41
|
def init(username)
|
@@ -43,10 +43,10 @@ def init(username)
|
|
43
43
|
@root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
|
44
44
|
end
|
45
45
|
|
46
|
-
def anyenv_init_with(command)
|
46
|
+
def anyenv_init_with(root_path, command)
|
47
47
|
<<-"EOS".gsub("\n", ' ')
|
48
|
-
export ANYENV_ROOT=#{
|
49
|
-
export PATH=#{
|
48
|
+
export ANYENV_ROOT=#{root_path};
|
49
|
+
export PATH=#{root_path}/bin:${PATH};
|
50
50
|
eval "$(anyenv init -)";
|
51
51
|
#{command}
|
52
52
|
EOS
|
@@ -137,7 +137,7 @@ end
|
|
137
137
|
def global_version(envname, version)
|
138
138
|
execute "#{envname} global #{version}" do
|
139
139
|
# user @username if @username
|
140
|
-
command anyenv_init_with <<-EOS
|
140
|
+
command anyenv_init_with @root_path, <<-EOS
|
141
141
|
#{envname} global;
|
142
142
|
#{version}; #{envname} rehash;
|
143
143
|
EOS
|