[go: up one dir, main page]

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

fix: make ddev --version work even if not in project and ~/.ddev/commands not yet created #5854

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

rfay
Copy link
Member
@rfay rfay commented Feb 16, 2024

The Issue

If no ~/.ddev exists, and ddev --version is executed in a directory that is not a project, the global commands directory doesn't get created. You end up getting an error like this:

$ mv ~/.ddev ~/.ddev.bak
rfay@ub-2204:~/workspace/ddev$ ddev --version
Adding custom/shell commands failed: open /home/rfay/.ddev/commands/host: no such file or directory
ddev version v1.22.7-23-gefa8cea57

How This PR Solves The Issue

Create the global directory structure before existing the test for "am I in a project"

Manual Testing Instructions

mkdir -p ~/tmp/junk && cd ~/tmp/junk
mv ~/.ddev ~/.ddev.bak
ddev --version

You shouldn't get an error message. Don't forget to copy your ~/.ddev back into place if you care about it.

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

@rfay rfay changed the title fix: ddev --version should work even if not in project and ~/.ddev/commands not yet created fix: make ddev --version work even if not in project and ~/.ddev/commands not yet created Feb 16, 2024
Copy link

@rfay rfay marked this pull request as ready for review February 17, 2024 01:26
@rfay rfay requested a review from a team as a code owner February 17, 2024 01:26
@rfay rfay merged commit ca7e2ab into ddev:master Feb 17, 2024
21 of 24 checks passed
@rfay rfay deleted the 20240216_create_commands_on_start branch February 17, 2024 01:28
@rfay
Copy link
Member Author
rfay commented Feb 18, 2024

This problem existed in v1.22.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant