kameleon-builder 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGES +7 -0
- data/lib/kameleon/context.rb +2 -0
- data/lib/kameleon/engine.rb +5 -1
- data/lib/kameleon/error.rb +2 -0
- data/lib/kameleon/shell.rb +7 -1
- data/version.txt +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: d28b83e3c333c8da43019ff46a15afbc4e8936e3
|
4
|
+
data.tar.gz: b8fc0d08a15042f08826d67efaf4c03f5f2ccc63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f89095a4cb9803cb48e43b93d8f569210a8c2bb7d5bb5ebba8cefb434c6e0396588d5dd0d9b8967d6e27fe7608a493849f0de1c799f01aa7484481dfdf90ffc0
|
7
|
+
data.tar.gz: 6e22a24a0839f7f8e492255d2e60f9a37a04c1cd830778be00acb09e2d16a6c1014602e448dea41d5f3da62032f367eef390c10040339274e81542293ef70bfe
|
data/.bumpversion.cfg
CHANGED
data/CHANGES
CHANGED
data/lib/kameleon/context.rb
CHANGED
@@ -82,6 +82,8 @@ module Kameleon
|
|
82
82
|
rescue ShellError, Errno::EPIPE => e
|
83
83
|
Kameleon.ui.verbose("Shell cmd failed to launch: #{@shell.shell_cmd}")
|
84
84
|
raise ExecError, e.message + ". The '#{@name}_context' is inaccessible."
|
85
|
+
rescue ShellExited
|
86
|
+
raise ContextClosed, "The ctx '#{name}' was closed"
|
85
87
|
end
|
86
88
|
|
87
89
|
def pipe(cmd, other_cmd, other_ctx)
|
data/lib/kameleon/engine.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'kameleon/recipe'
|
2
2
|
require 'kameleon/context'
|
3
3
|
require 'kameleon/persistent_cache'
|
4
|
-
|
4
|
+
|
5
|
+
|
5
6
|
module Kameleon
|
6
7
|
|
7
8
|
class Engine
|
@@ -217,6 +218,9 @@ module Kameleon
|
|
217
218
|
begin
|
218
219
|
exec_cmd(cmd, kwargs)
|
219
220
|
finished = true
|
221
|
+
rescue ContextClosed => e
|
222
|
+
Kameleon.ui.warn("#{e.message}")
|
223
|
+
finished = true
|
220
224
|
rescue SystemExit, Interrupt, ExecError
|
221
225
|
reload_contexts
|
222
226
|
finished = rescue_exec_error(cmd)
|
data/lib/kameleon/error.rb
CHANGED
@@ -18,7 +18,9 @@ module Kameleon
|
|
18
18
|
class ExecError < Error; status_code(2) ; end
|
19
19
|
class InternalError < Error; status_code(3) ; end
|
20
20
|
class ContextError < Error; status_code(4) ; end
|
21
|
+
class ContextClosed < Error; status_code(4) ; end
|
21
22
|
class ShellError < Error; status_code(5) ; end
|
23
|
+
class ShellExited < Error; status_code(5) ; end
|
22
24
|
class RecipeError < Error; status_code(6) ; end
|
23
25
|
class BuildError < Error; status_code(7) ; end
|
24
26
|
class AbortError < Error; status_code(8) ; end
|
data/lib/kameleon/shell.rb
CHANGED
@@ -191,10 +191,13 @@ SCRIPT
|
|
191
191
|
}
|
192
192
|
while true
|
193
193
|
if @process.exited?
|
194
|
-
raise
|
194
|
+
raise ShellExited, "Process '#{@cmd}' exited..."
|
195
195
|
end
|
196
196
|
iodata.each do |_, iodat|
|
197
197
|
if iodat[:end] and not iodat[:begin]
|
198
|
+
if @process.exited?
|
199
|
+
raise ShellExited, "Process '#{@cmd}' exited..."
|
200
|
+
end
|
198
201
|
raise ShellError, "Cannot read #{iodat[:begin]} from shell"
|
199
202
|
end
|
200
203
|
end
|
@@ -231,6 +234,9 @@ SCRIPT
|
|
231
234
|
end
|
232
235
|
end
|
233
236
|
end
|
237
|
+
if @process.exited?
|
238
|
+
raise ShellExited, "Process '#{@cmd}' exited..."
|
239
|
+
end
|
234
240
|
iodata = nil
|
235
241
|
return get_status
|
236
242
|
end
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.3
|