knife-node-context-exec 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/knife-node-context-exec/runner.rb +3 -3
- data/lib/knife-node-context-exec/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: a52afc629e1318c4af947cec7840bd50367cbe57
|
4
|
+
data.tar.gz: c26520eabf983e532168085243dbcbbfb5eea275
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bd48d39214706292d02aa18e8e7b05f75de8d50e892a6dd00ed45e25569b5f3bd9abe852731d1c0b7f3d45dacea6e71058edd9ba65390edeec859e63e134a67
|
7
|
+
data.tar.gz: 727544d9f3cbe4b9552e3653b0845e8cba4146e75bcfae35d336c17c7a70fe0dcc708f4adc6346f976176f19d4e21d28d03cba35e295d91ad2b325a7c94e36d3
|
@@ -21,10 +21,10 @@ module KnifeNodeContextExec
|
|
21
21
|
FileUtils.makedirs(script_directory)
|
22
22
|
template = File.read(template_filename)
|
23
23
|
script = ERB.new(template).result(binding)
|
24
|
-
full_script_filename =
|
25
|
-
File.join(script_directory, script_filename).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
|
24
|
+
full_script_filename = File.join(script_directory, script_filename)
|
26
25
|
File.open(full_script_filename, 'w') { |file| file.puts(script) }
|
27
|
-
cooked_command =
|
26
|
+
cooked_command =
|
27
|
+
command.gsub('%script%', full_script_filename).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
|
28
28
|
@output = []
|
29
29
|
yield(">>>> Command: #{cooked_command} <<<<")
|
30
30
|
Open3.pipeline_r(cooked_command) do |output, _|
|