Skip to content

Commit 9e93b6c

Browse files
committed
Preserve .invalidArgument errors
1 parent 5cc372e commit 9e93b6c

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

vminitd/Sources/vminitd/Server+GRPC.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,14 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid
525525
"signal": "\(request.signal)",
526526
])
527527

528-
do {
529-
if !request.hasContainerID {
530-
throw ContainerizationError(
531-
.invalidArgument,
532-
message: "processes in the root of the vm not implemented"
533-
)
534-
}
528+
if !request.hasContainerID {
529+
throw ContainerizationError(
530+
.invalidArgument,
531+
message: "processes in the root of the vm not implemented"
532+
)
533+
}
535534

535+
do {
536536
let ctr = try await self.state.get(container: request.containerID)
537537
try await ctr.kill(execID: request.id, request.signal)
538538

@@ -576,14 +576,14 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid
576576
"containerID": "\(request.containerID)",
577577
])
578578

579-
do {
580-
if !request.hasContainerID {
581-
throw ContainerizationError(
582-
.invalidArgument,
583-
message: "processes in the root of the vm not implemented"
584-
)
585-
}
579+
if !request.hasContainerID {
580+
throw ContainerizationError(
581+
.invalidArgument,
582+
message: "processes in the root of the vm not implemented"
583+
)
584+
}
586585

586+
do {
587587
let ctr = try await self.state.get(container: request.containerID)
588588

589589
// Are we trying to delete the container itself?

0 commit comments

Comments
 (0)