itamae-plugin-recipe-anyenv 0.3.42 → 0.3.43
Sign up to get free protection for your applications and to get access to all the features.
- 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: cb5ecb4090c20c63454271110218f0c7ab5fd617
|
4
|
+
data.tar.gz: 1c41b91dca91a4c5109b96da9fe01d420055ac10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3526bd814ea518401c46b1f440cf5795dddc9d7df2960a4ceebecc1c0c526a382d02798d03d1ad5d0e759a04d03cfe3b0cc3bcd24d2332ebba7a527398db18d
|
7
|
+
data.tar.gz: 05fc9aa1fba187be6248cf82e0a34ab68c66336d824bb6beaf4c79b7b2094fbffc3760ff271bfb8478608d2f0082c77208bc5ba63cd4a010c5018244ed5671fb
|
@@ -27,7 +27,7 @@ def init(username)
|
|
27
27
|
@root_path = ENV['ANYENV_ROOT'] || DEFAULT_ANYENV_ROOT
|
28
28
|
end
|
29
29
|
|
30
|
-
def anyenv_init_with(
|
30
|
+
def anyenv_init_with(command)
|
31
31
|
<<-"EOS".gsub("\n", ' ')
|
32
32
|
export ANYENV_ROOT=#{root_path};
|
33
33
|
export PATH=#{root_path}/bin:${PATH};
|
@@ -70,10 +70,10 @@ def install_envs(attributes)
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def install_env(envname)
|
73
|
-
exec = anyenv_init_with
|
73
|
+
exec = anyenv_init_with <<-EOS
|
74
74
|
yes | anyenv install #{envname}
|
75
75
|
EOS
|
76
|
-
is_exec = anyenv_init_with
|
76
|
+
is_exec = anyenv_init_with "type #{envname}"
|
77
77
|
|
78
78
|
execute "install #{envname}" do
|
79
79
|
user @username if @username
|
@@ -83,10 +83,10 @@ def install_env(envname)
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def install_env_version(envname, version)
|
86
|
-
exec = anyenv_init_with
|
86
|
+
exec = anyenv_init_with <<-EOS
|
87
87
|
yes | #{envname} install #{version}
|
88
88
|
EOS
|
89
|
-
is_exec = anyenv_init_with
|
89
|
+
is_exec = anyenv_init_with "#{envname} versions | grep #{version}"
|
90
90
|
|
91
91
|
execute "#{envname} install #{version}" do
|
92
92
|
user @username if @username
|
@@ -96,11 +96,11 @@ def install_env_version(envname, version)
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def global_version(envname, version)
|
99
|
-
exec = anyenv_init_with
|
99
|
+
exec = anyenv_init_with <<-EOS
|
100
100
|
#{envname} global;
|
101
101
|
#{version}; #{envname} rehash;
|
102
102
|
EOS
|
103
|
-
is_exec = anyenv_init_with
|
103
|
+
is_exec = anyenv_init_with "#{envname} versions | grep #{version}"
|
104
104
|
|
105
105
|
execute "#{envname} global #{version}" do
|
106
106
|
user @username if @username
|