Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fstab line endings #2400

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions archinstall/lib/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ def decode(self, encoding: str = 'utf-8', errors='backslashreplace', strip: bool
return val.strip()
return val

def output(self) -> bytes:
if not self.session:
raise ValueError('No session available')

return self.session._trace_log.replace(b'\r\n', b'\n')

@property
def exit_code(self) -> Optional[int]:
if self.session:
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ def genfstab(self, flags: str = '-pU'):
info(f"Updating {fstab_path}")

try:
gen_fstab = SysCommand(f'/usr/bin/genfstab {flags} {self.target}').decode()
gen_fstab = SysCommand(f'/usr/bin/genfstab {flags} {self.target}').output()
except SysCallError as err:
raise RequirementError(
f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n Error: {err}')

with open(fstab_path, 'a') as fp:
with open(fstab_path, 'ab') as fp:
fp.write(gen_fstab)

if not fstab_path.is_file():
Expand Down