File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1716,6 +1716,14 @@ pub(crate) async fn install_to_filesystem(
1716
1716
}
1717
1717
}
1718
1718
1719
+ // Check to see if this happens to be the real host root
1720
+ if !fsopts. acknowledge_destructive {
1721
+ let root_path = & fsopts. root_path ;
1722
+ let rootfs_fd = Dir :: open_ambient_dir ( root_path, cap_std:: ambient_authority ( ) )
1723
+ . with_context ( || format ! ( "Opening target root directory {root_path}" ) ) ?;
1724
+ warn_on_host_root ( & rootfs_fd) ?;
1725
+ }
1726
+
1719
1727
// If we're installing to an ostree root, then find the physical root from
1720
1728
// the deployment root.
1721
1729
let possible_physical_root = fsopts. root_path . join ( "sysroot" ) ;
@@ -1741,11 +1749,6 @@ pub(crate) async fn install_to_filesystem(
1741
1749
rootfs_fd
1742
1750
} ;
1743
1751
1744
- // Check to see if this happens to be the real host root
1745
- if !fsopts. acknowledge_destructive {
1746
- warn_on_host_root ( & rootfs_fd) ?;
1747
- }
1748
-
1749
1752
match fsopts. replace {
1750
1753
Some ( ReplaceMode :: Wipe ) => {
1751
1754
let rootfs_fd = rootfs_fd. try_clone ( ) ?;
You can’t perform that action at this time.
0 commit comments