Skip to content

Commit 52b3633

Browse files
authored
Merge pull request #32 from jay7x/gh-31
Do not check `limactl list` exit code
2 parents 26500cd + fbf00e6 commit 52b3633

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/cli_helper.rb

+2-8
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,15 @@ def version
4040

4141
def list(vm_names = [])
4242
lima_cmd = [@limactl, 'list', '--json'] + vm_names
43-
stdout_str, stderr_str, status = Open3.capture3(*lima_cmd)
44-
unless status.success?
45-
raise LimaError, "`#{lima_cmd.join(' ')}` failed with status #{status.exitstatus}: #{stderr_str}"
46-
end
43+
stdout_str, _stderr_str, _status = Open3.capture3(*lima_cmd)
4744

4845
stdout_str.split("\n").map { |vm| JSON.parse(vm) }
4946
end
5047

5148
# A bit faster `list` variant to check the VM status
5249
def status(vm_name)
5350
lima_cmd = [@limactl, 'list', '--format', '{{ .Status }}', vm_name]
54-
stdout_str, stderr_str, status = Open3.capture3(*lima_cmd)
55-
unless status.success?
56-
raise LimaError, "`#{lima_cmd.join(' ')}` failed with status #{status.exitstatus}: #{stderr_str}"
57-
end
51+
stdout_str, _stderr_str, _status = Open3.capture3(*lima_cmd)
5852

5953
stdout_str.chomp
6054
end

0 commit comments

Comments
 (0)