lando rebuild fails with:
ERROR ==> EISDIR: illegal operation on a directory, open '/Users/***/.lando/certs/appserver.***.crt'
write-file.js's default case only checked !fs.existsSync(file) before creating parent directories. If a directory existed at the target file path (e.g., from a previous malformed cert generation), existsSync returned true, skipping mkdir, and fs.writeFileSync crashed with EISDIR.
Fix
utils/write-file.js — In the default case, check if the target path exists and is a directory. If so, remove it before writing the file. Also replaced deprecated fs.rmdirSync({recursive: true}) with fs.rmSync({recursive: true}).
lando rebuild fails with:
ERROR ==> EISDIR: illegal operation on a directory, open '/Users/***/.lando/certs/appserver.***.crt'write-file.js's default case only checked !fs.existsSync(file) before creating parent directories. If a directory existed at the target file path (e.g., from a previous malformed cert generation), existsSync returned true, skipping mkdir, and fs.writeFileSync crashed with EISDIR.
Fix
utils/write-file.js— In the default case, check if the target path exists and is a directory. If so, remove it before writing the file. Also replaced deprecated fs.rmdirSync({recursive: true}) with fs.rmSync({recursive: true}).