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

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

AaronFeledy
Copy link
Member

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 f822b05
🔍 Latest deploy log https://app.netlify.com/sites/lando-core/deploys/66a278e663d64200085d1a5a
😎 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: 93 (🔴 down 1 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
Member Author

lando/lando#2051

@pirog pirog self-assigned this May 21, 2024
@pirog pirog merged commit 8c972da into main Jul 25, 2024
54 checks passed
@pirog pirog deleted the illegal-op-dir branch July 25, 2024 17:09
pirog added a commit that referenced this pull request Oct 10, 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.

3 participants