mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 20:12:56 -04:00
test: use diskutil unmount
instead of umount
on macOS
This commit is contained in:
parent
bd5524792f
commit
bb4c3ca596
@ -604,13 +604,14 @@ class driver_runner {
|
||||
|
||||
if (!mountpoint_.empty()) {
|
||||
#ifdef __APPLE__
|
||||
auto umount = dwarfs::test::find_binary("umount");
|
||||
if (!umount) {
|
||||
throw std::runtime_error("no umount binary found");
|
||||
auto diskutil = dwarfs::test::find_binary("diskutil");
|
||||
if (!diskutil) {
|
||||
throw std::runtime_error("no diskutil binary found");
|
||||
}
|
||||
auto t0 = std::chrono::steady_clock::now();
|
||||
for (;;) {
|
||||
auto [out, err, ec] = subprocess::run(umount.value(), mountpoint_);
|
||||
auto [out, err, ec] =
|
||||
subprocess::run(diskutil.value(), "unmount", mountpoint_);
|
||||
if (ec == 0) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user