Skip to content

Commit 1e07d57

Browse files
committed
Release v1.3.12
2 parents 7588045 + e8b4644 commit 1e07d57

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

lib/vagrant-parallels/driver/base.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def initialize
2626

2727
@prlctl_path = util_path('prlctl')
2828
@prlsrvctl_path = util_path('prlsrvctl')
29+
@prldisktool_path = util_path('prl_disk_tool')
2930

3031
if !@prlctl_path
3132
# This means that Parallels Desktop was not found, so we raise this

lib/vagrant-parallels/driver/pd_8.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def compact(uuid)
2424
name.start_with? 'hdd'
2525
end
2626
used_drives.each_value do |drive_params|
27-
execute('prl_disk_tool', 'compact', '--hdd', drive_params['image']) do |type, data|
27+
execute(@prldisktool_path, 'compact', '--hdd', drive_params['image']) do |type, data|
2828
lines = data.split("\r")
2929
# The progress of the compact will be in the last line. Do a greedy
3030
# regular expression to find what we're looking for.
@@ -168,9 +168,9 @@ def export(path, tpl_name)
168168
end
169169

170170
def halt(force=false)
171-
args = ['prlctl', 'stop', @uuid]
171+
args = ['stop', @uuid]
172172
args << '--kill' if force
173-
execute(*args)
173+
execute_prlctl(*args)
174174
end
175175

176176
def import(tpl_name)
@@ -447,7 +447,7 @@ def regenerate_src_uuid
447447
end
448448

449449
def register(pvm_file)
450-
args = ['prlctl', 'register', pvm_file]
450+
args = [@prlctl_path, 'register', pvm_file]
451451

452452
3.times do
453453
result = raw(*args)
@@ -465,7 +465,7 @@ def register(pvm_file)
465465
# If we reach this point, it means that we consistently got the
466466
# failure, do a standard execute now. This will raise an
467467
# exception if it fails again.
468-
execute(*args)
468+
execute_prlctl(*args)
469469
end
470470

471471
def registered?(uuid)
@@ -516,7 +516,7 @@ def suspend
516516
end
517517

518518
def unregister(uuid)
519-
args = ['prlctl', 'unregister', uuid]
519+
args = [@prlctl_path, 'unregister', uuid]
520520
3.times do
521521
result = raw(*args)
522522
# Exit if everything is OK
@@ -534,7 +534,7 @@ def unregister(uuid)
534534
# If we reach this point, it means that we consistently got the
535535
# failure, do a standard execute now. This will raise an
536536
# exception if it fails again.
537-
execute(*args)
537+
execute_prlctl(*args)
538538
end
539539

540540
def unshare_folders(names)
@@ -545,7 +545,7 @@ def unshare_folders(names)
545545

546546
def vm_exists?(uuid)
547547
5.times do |i|
548-
result = raw('prlctl', 'list', uuid)
548+
result = raw(@prlctl_path, 'list', uuid)
549549
return true if result.exit_code == 0
550550

551551
# Sometimes this happens. In this case, retry. If

test/unit/support/shared/parallels_context.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def subprocess_result(options={})
3434
# Consider that 'prlctl' and 'prlsrvctl' binaries are available
3535
allow(Vagrant::Util::Which).to receive(:which).with('prlctl').and_return('prlctl')
3636
allow(Vagrant::Util::Which).to receive(:which).with('prlsrvctl').and_return('prlsrvctl')
37+
allow(Vagrant::Util::Which).to receive(:which).with('prl_disk_tool').and_return('prl_disk_tool')
3738

3839
# we don't want unit tests to ever run commands on the system; so we wire
3940
# in a double to ensure any unexpected messages raise exceptions

0 commit comments

Comments
 (0)