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

Replace launcha with adminer command #18

Merged
merged 10 commits into from
Oct 2, 2023
Merged

Replace launcha with adminer command #18

merged 10 commits into from
Oct 2, 2023

Conversation

mejta
Copy link
Contributor

@mejta mejta commented Aug 27, 2023

The Issue

The current way to launch Adminer is via ddev launcha -a. It's different from how e.g. PHPMyAdmin is launched (ddev phpmyadmin).

How This PR Solves The Issue

PR changes launching the Adminer the same way like PHPMyAdmin:
ddev adminer

Manual Testing Instructions

ddev get https://github.com/mejta/ddev-adminer/tarball/replace-launcha-with-adminer-command

@mejta mejta changed the title Replace launcha with adminer command Replace launcha with adminer command Aug 27, 2023
@mejta mejta mentioned this pull request Aug 27, 2023
@rfay
Copy link
Member

rfay commented Aug 29, 2023

Test this one with

ddev get https://github.com/mejta/ddev-adminer/tarball/replace-launcha-with-adminer-command

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the way to go, and thanks!

Right now, it gives the required message on ddev launcha -h:

Launcha is no longer available. Please use 'ddev launch' instead. To run Adminer, please use 'ddev adminer'.

BUT... it doesn't give that message when people use ddev launcha, which just silently returns. Please make it return with error text and an error exit value, thanks!

Improving the test would be good too, currently it has

  ddev help adminer | grep adminer >/dev/null
  ddev help launcha | grep adminer >/dev/null

but really testing for ddev launcha returning an error would be better.

@tyler36
Copy link
Collaborator

tyler36 commented Aug 30, 2023

Confirmed.

$ ddev launcha -h                                                                            
Launcha is no longer available. Please use 'ddev launch' instead. To run Adminer, please use 'ddev adminer'.
Failed to run launcha -h; error=exit status 2

ddev launcha appears to do nothing:

$ ddev launcha

$

@mejta
Copy link
Contributor Author

mejta commented Sep 4, 2023

@rfay I've updated the code. I'm not super-confident with bash, so I've created a test that fails if the exit status on ddev launcha is 0, so hopefully, it's written well :) Thank you for your comments and for maintaining DDEV; it's a super-useful tool!

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have mentioned this simpler approach before, and wasn't clear.

Just make the launcha command look something like this:

#!/bin/bash
#ddev-generated
printf "'ddev launcha' is no longer available. Use 'ddev launch' and 'ddev adminer' instead."
exit 2

Maybe give a link to https://github.com/ddev-ddev-adminer.

@rfay
Copy link
Member

rfay commented Sep 19, 2023

I don't want to lose track of this; can you try the super-simple approach? thanks @mejta !

@rfay
Copy link
Member

rfay commented Sep 19, 2023

@mejta
Copy link
Contributor Author

mejta commented Oct 2, 2023

Sorry for delay, launcha command modified.

@rfay rfay merged commit bc0c9f8 into ddev:main Oct 2, 2023
2 checks passed
@mejta mejta deleted the replace-launcha-with-adminer-command branch October 2, 2023 10:18
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