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

adding excludes ignores before creating file creates folder #3441

Open
oskarmodig opened this issue Aug 30, 2022 · 3 comments
Open

adding excludes ignores before creating file creates folder #3441

oskarmodig opened this issue Aug 30, 2022 · 3 comments
Labels
bug Something aint working right!

Comments

@oskarmodig
Copy link
Collaborator

oskarmodig commented Aug 30, 2022

If I add a file to excludes before it exists, starting the app generates a folder with the name of the file.

For instance, I usually exclude my entire wordpress folder, but I ignore .htaccess and wp-config.php to be able to edit these.
I have a template yaml-file I use for all my WP-projects, where I have the excludes:

excludes:
  - wordpress
  - "!wordpress/wp-config.php"
  - "!wordpress/.htaccess"

But when I start the app like this it creates the wordpress folder, and in it it creates folders called wp-config.php and .htaccess.
So now I have to create the files manually before starting the app. While this works I'd like to skip these extra steps.

I also tried creating the files in various events, but for some reason the sync seems to happen before anyway. Like this:

events:
  pre-bootstrap-app:
    - appserver: mkdir wordpress
    - appserver: touch wordpress/wp-config.php
    - appserver: touch wordpress/.htaccess
    - appserver: touch wordpress/test.txt

I also tried events like pre-start, ready, post-bootstrap-app and pre-init.

So what I'd like is that if if the ignore path seems to be a file it creates an empty file rather than a directory.


I'm running lando 3.6.5 with Docker 3.6.0 (67351) on Windows 11.

@oskarmodig oskarmodig added the bug Something aint working right! label Aug 30, 2022
@GoonerW
Copy link

GoonerW commented Sep 8, 2022

It does the same when you specify a custom php.ini file
config: php: .vscode/php.ini
and the file doesn't exist.

This creates an empty directory called /app/.vscode/php.ini (not file)

@stale
Copy link

stale bot commented May 22, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@stale stale bot added the stale Issue has been auto-flagged as stale label May 22, 2023
@oskarmodig
Copy link
Collaborator Author

This is still relevant for me

@stale stale bot removed the stale Issue has been auto-flagged as stale label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right!
Projects
None yet
Development

No branches or pull requests

2 participants