summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/config/cc_disk_setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py
index 29e192e8..d8d0fcf1 100644
--- a/cloudinit/config/cc_disk_setup.py
+++ b/cloudinit/config/cc_disk_setup.py
@@ -982,7 +982,9 @@ def mkfs(fs_cfg):
# File systems that support the -F flag
if overwrite or device_type(device) == "disk":
- fs_cmd.append(lookup_force_flag(fs_type))
+ force_flag = lookup_force_flag(fs_type)
+ if force_flag:
+ fs_cmd.append(force_flag)
# Add the extends FS options
if fs_opts: