@@ -20,6 +20,16 @@ fn run() -> Result<()> {
20
20
21
21
let config = config:: ReinstallConfig :: load ( ) . context ( "loading config" ) ?;
22
22
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
+
23
33
let ssh_key_file = tempfile:: NamedTempFile :: new ( ) ?;
24
34
let ssh_key_file_path = ssh_key_file
25
35
. path ( )
@@ -30,18 +40,14 @@ fn run() -> Result<()> {
30
40
31
41
prompt:: get_ssh_keys ( ssh_key_file_path) ?;
32
42
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) ;
34
45
35
46
println ! ( ) ;
36
-
37
47
println ! ( "Going to run command {:?}" , reinstall_podman_command) ;
38
48
39
49
prompt:: temporary_developer_protection_prompt ( ) ?;
40
50
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
-
45
51
reinstall_podman_command
46
52
. run_with_cmd_context ( )
47
53
. context ( "running reinstall command" ) ?;
0 commit comments