From b23d553220f7461d8763a0b64459f48455089d94 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 17 Jul 2023 13:54:57 +1200 Subject: [PATCH] fix using late-commands and reset-partition-only at the same time --- examples/autoinstall/reset-only.yaml | 2 ++ subiquity/server/controllers/cmdlist.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/autoinstall/reset-only.yaml b/examples/autoinstall/reset-only.yaml index f9b19318..cb4eedf5 100644 --- a/examples/autoinstall/reset-only.yaml +++ b/examples/autoinstall/reset-only.yaml @@ -9,3 +9,5 @@ storage: name: direct reset-partition: yes reset-partition-only: yes +late-commands: + - ['true'] diff --git a/subiquity/server/controllers/cmdlist.py b/subiquity/server/controllers/cmdlist.py index 3a2b0807..d6149438 100644 --- a/subiquity/server/controllers/cmdlist.py +++ b/subiquity/server/controllers/cmdlist.py @@ -129,7 +129,8 @@ class LateController(CmdListController): def env(self): env = super().env() - env['TARGET_MOUNT_POINT'] = self.app.base_model.target + if self.app.base_model.target is not None: + env['TARGET_MOUNT_POINT'] = self.app.base_model.target return env def start(self):