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

Bug: vagrant reload --provision fails on composer create project installation #2704

Open
ubuntupunk opened this issue Feb 20, 2024 · 1 comment
Labels

Comments

@ubuntupunk
Copy link

Are you using the latest stable or develop branch version of VVV?

Yes (stable)

Is it a new VVV, or an existing VVV that used to work?

Existing, worked but now broken

Did you use a CustomFile?

No (default)

Whats the problem?

Project directory "/srv/www/craft/public_html/." is not empty.  
    default:                                                                   
    default: create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]
    default:  ! The 'site-craft' provisioner ran into problems, the full log is available at '/var/log/provisioners/2024.02.20_10-03-34/provisioner-site-craft.log'. It completed in 3 seconds.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

How do we reproduce it?

Install Craft according to instructions provided. Enable site. Then reload vagrant with provisioning. The provisioner will fail because installation exists. Needs some logic, if site exists, composer only update changes.

What is the output of vagrant status

vagrant status
__ __ __ __
\ V\ V\ V / v3.12 Ruby:2.7.0, Path:"/media/afrodeity/Neptune/vagrant/vvv-local"
 \_/\_/\_/  git::stable(aee9a695)

Platform: linux-gnu shell:/bin/bash systemd  vagrant-hostsupdater vagrant-goodhosts CaseSensitiveFS shared_db_folder_disabled
Vagrant: v2.2.6, virtualbox: v6.1.50

Docs:       https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Dashboard:  http://vvv.test

Which Operating System are you using?

Linux

Which provider are you using?

VirtualBox 6

@tomjn
Copy link
Member

tomjn commented Feb 20, 2024

The quick fix is to remove the section of config.yml telling it to run composer create project for that site.

Otherwise there's now an open problem of how to ensure you can repeatedly run composer create-project and not have it exit the second time round reporting it's already been created.

Note that the example you're following for using Craft CMS is speculative, it isn't the canonical method of using Craft CMS ( no canonical method exists )

@tomjn tomjn changed the title Bug: vagrant reload --provision fails on craft installation Bug: vagrant reload --provision fails on composer create project installation Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants