Skip to content

Commit

Permalink
chore: fix example
Browse files Browse the repository at this point in the history
Signed-off-by: black-desk <me@black-desk.cn>
  • Loading branch information
black-desk committed Jan 16, 2024
1 parent 16556aa commit 85fa1a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/using-crun/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,14 @@ auto main() -> int
return -1;
}

if (list->empty()) {
std::cerr << "No container exists." << std::endl;
return 0;
}

for (auto item : list.value()) {
nlohmann::json j = item;
std::cout << "exists container " << j.dump() << std::endl;
std::cerr << "exists container " << j.dump() << std::endl;
}

auto state = cli->state(list->front().id.c_str());
Expand Down

0 comments on commit 85fa1a5

Please sign in to comment.