Skip to content

Commit

Permalink
write error to stderr when VM fails to start
Browse files Browse the repository at this point in the history
  • Loading branch information
gyf304 committed Jan 19, 2021
1 parent 0f30eb4 commit ca4fc1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vmcli/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ Omit mac address for a generated address.
switch result {
case .success:
return
case .failure:
case .failure(let error):
FileHandle.standardError.write(error.localizedDescription.data(using: .utf8)!)
FileHandle.standardError.write("\n".data(using: .utf8)!)
quit(1)
}
})
Expand Down

0 comments on commit ca4fc1c

Please sign in to comment.