Skip to content

Commit 9d5a648

Browse files
committed
Disable default credentials save
1 parent d326cef commit 9d5a648

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

archinstall/lib/configuration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,13 @@ def save_user_creds(self, dest_path: Path) -> None:
105105
target.write_text(self.user_credentials_to_json())
106106
target.chmod(stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP)
107107

108-
def save(self, dest_path: Path | None = None) -> None:
108+
def save(self, dest_path: Path | None = None, creds: bool = False) -> None:
109109
save_path = dest_path or self._default_save_path
110110

111111
if self._is_valid_path(save_path):
112112
self.save_user_config(save_path)
113-
self.save_user_creds(save_path)
113+
if creds:
114+
self.save_user_creds(save_path)
114115

115116

116117
def save_config(config: ArchConfig) -> None:

tests/test_configuration_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_creds_roundtrip(
6060
test_out_dir = Path('/tmp/')
6161
test_out_file = test_out_dir / config_output.user_credentials_file
6262

63-
config_output.save(test_out_dir)
63+
config_output.save(test_out_dir, creds=True)
6464

6565
result = json.loads(test_out_file.read_text())
6666
expected = json.loads(creds_fixture.read_text())

0 commit comments

Comments
 (0)