Promotes the "--no-checks" to outside of dry-run

Tests in real WSL2 environment revealed that update-locale checks fails but with the "--no-checks" option it updates the locale files accordingly and when the image restarts the locale is correctly set.
This commit is contained in:
Carlos Nihelton 2022-01-18 10:18:45 -03:00 committed by GitHub
parent a14a143d55
commit 0d30deac7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,8 @@ class ConfigureController(SubiquityController):
def __update_locale_cmd(self, lang) -> List[str]:
""" Add mocking cli to update-locale if in dry-run."""
updateLocCmd = ["update-locale", "LANG={}".format(lang)]
updateLocCmd = ["update-locale", "LANG={}".format(lang),
"--no-checks"]
if not self.app.opts.dry_run:
return updateLocCmd
@ -93,8 +94,7 @@ class ConfigureController(SubiquityController):
"etc/default/")
os.makedirs(defaultLocDir, exist_ok=True)
updateLocCmd += ["--locale-file",
os.path.join(defaultLocDir, "locale"),
"--no-checks"]
os.path.join(defaultLocDir, "locale")]
return updateLocCmd
async def _activate_locale(self, lang, env) -> bool: