Skip to content

Commit 68ae1b1

Browse files
aero.py: fix build failure when sysroot does not exist
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
1 parent ce56d39 commit 68ae1b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aero.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ def prepare_iso(args, kernel_bin, user_bins):
438438
sysroot_dir = os.path.join(SYSROOT_DIR, 'system-root')
439439
for file in user_bins:
440440
bin_name = os.path.basename(file)
441-
shutil.copy(file, os.path.join(sysroot_dir, "usr", "bin", bin_name))
441+
dest_dir = os.path.join(sysroot_dir, "usr", "bin")
442+
os.makedirs(dest_dir, exist_ok=True)
443+
shutil.copy(file, os.path.join(dest_dir, bin_name))
442444

443445
with open(os.path.join(iso_root, 'limine.cfg'), 'w') as limine_cfg:
444446
limine_cfg.write(LIMINE_TEMPLATE)

0 commit comments

Comments
 (0)