Skip to content

Commit

Permalink
Refactor set_hostname() (archlinux#3009)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored and castillofrancodamian committed Dec 21, 2024
1 parent 50ed3a7 commit 773a4bf
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 773a4bf

Please sign in to comment.