Skip to content

Commit

Permalink
Refactor set_hostname() (#3009)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Dec 7, 2024
1 parent 3400991 commit 8f2bf2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,7 @@ def genfstab(self, flags: str = '-pU') -> None:
fp.write(f'{entry}\n')

def set_hostname(self, hostname: str) -> None:
with open(f'{self.target}/etc/hostname', 'w') as fh:
fh.write(hostname + '\n')
(self.target / 'etc/hostname').write_text(hostname + '\n')

def set_locale(self, locale_config: LocaleConfiguration) -> bool:
modifier = ''
Expand Down

0 comments on commit 8f2bf2b

Please sign in to comment.