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

Fixes EISDIR corrective action creating new EISDIR errors later #169

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AaronFeledy
Copy link
Collaborator

Fixes this error I ran into:

Error: EISDIR: illegal operation on a directory, unlink '/home/aaron/.lando/config/pantheon/drupal10.conf.tpl'

Seems some error case gets checked to see if a directory can be created. This is problematic if the f getting passed to mkdir is a file name. When there is now a directory with the path and name of one of our files, subsequent runs of this function will attempt to put the file where there is now a directory with the same name. It breaks because unlinking a directory is not possible.

I added a function to remove the directory that got created during the mkdir in the conditional above it. It's equivalent to an rm -rf so it won't throw a new error if f doesn't exist.

Copy link

netlify bot commented May 16, 2024

Deploy Preview for lando-core ready!

Name Link
🔨 Latest commit 181d1df
🔍 Latest deploy log https://app.netlify.com/sites/lando-core/deploys/6673136540870b00082818bf
😎 Deploy Preview https://deploy-preview-169--lando-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🟢 up 4 from production)
Accessibility: 98 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@AaronFeledy
Copy link
Collaborator Author

lando/lando#2051

@pirog pirog self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants