@@ -20,6 +20,16 @@ fn run() -> Result<()> {
2020
2121 let config = config:: ReinstallConfig :: load ( ) . context ( "loading config" ) ?;
2222
23+ podman:: ensure_podman_installed ( ) ?;
24+
25+ //pull image early so it can be inspected, e.g. to check for cloud-init
26+ let mut pull_image_command = podman:: pull_image_command ( & config. bootc_image ) ;
27+ pull_image_command
28+ . run_with_cmd_context ( )
29+ . context ( format ! ( "pulling image {}" , & config. bootc_image) ) ?;
30+
31+ println ! ( ) ;
32+
2333 let ssh_key_file = tempfile:: NamedTempFile :: new ( ) ?;
2434 let ssh_key_file_path = ssh_key_file
2535 . path ( )
@@ -30,18 +40,14 @@ fn run() -> Result<()> {
3040
3141 prompt:: get_ssh_keys ( ssh_key_file_path) ?;
3242
33- let mut reinstall_podman_command = podman:: command ( & config. bootc_image , ssh_key_file_path) ;
43+ let mut reinstall_podman_command =
44+ podman:: reinstall_command ( & config. bootc_image , ssh_key_file_path) ;
3445
3546 println ! ( ) ;
36-
3747 println ! ( "Going to run command {:?}" , reinstall_podman_command) ;
3848
3949 prompt:: temporary_developer_protection_prompt ( ) ?;
4050
41- // At this poihnt, the user has already given us permission to reinstall their system, so we
42- // feel confident with just installing podman without any further user interaction.
43- podman:: ensure_podman_installed ( ) ?;
44-
4551 reinstall_podman_command
4652 . run_with_cmd_context ( )
4753 . context ( "running reinstall command" ) ?;
0 commit comments