diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py index 8d6daefb..24387782 100644 --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -107,11 +107,12 @@ class luks2: pw_given = False while cryptworker.is_alive(): - if bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker and pw_given is False: - cryptworker.write(password) - with open('debug.txt', 'a') as silent_output: - silent_output.write(f"We did write the output to {cryptworker}") - pw_given = True + with open('debug_outer.txt', 'a') as silent_output: + found = bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker + silent_output.write(f"Found string in worker: {found} / {pw_given}") + if found and pw_given is False: + cryptworker.write(password) + pw_given = True if cryptworker.exit_code == 256: log(f'{partition} is being used, trying to unmount and crypt-close the device and running one more attempt at encrypting the device: {cryptworker}', level=logging.INFO)