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

Configure shell commands, like mysqldump #846

Open
amenk opened this issue Jul 30, 2016 · 6 comments
Open

Configure shell commands, like mysqldump #846

amenk opened this issue Jul 30, 2016 · 6 comments

Comments

@amenk
Copy link
Contributor

amenk commented Jul 30, 2016

I have a host where I have to use mysqldump5 (for accessing mysql 5) instead of mysqldump. Would be cool, if the shell names can be passed or configured.

Is there a workaround?
What do you think?

@amenk
Copy link
Contributor Author

amenk commented Jul 30, 2016

We call several commands

  • mysql
  • mysqldump
  • gzip
  • pv
  • tar

I think we should make them configurable using the config files like

CommandAliases
   mysqldump: mysqldump5

@ktomk
Copy link
Collaborator

ktomk commented Jul 31, 2016

You should be able to do this via an alias. The system should ship with all configuration options needed for this.

@amenk
Copy link
Contributor Author

amenk commented Aug 2, 2016

the point is that mysqldump5 is already an alias which I want to use.

@ktomk
Copy link
Collaborator

ktomk commented Aug 2, 2016

Just learning, it's not that straight forward. Can you check which shell is used by your PHP version?

$ php -r 'echo shell_exec("echo $0");'

In my case it is sh but I needed bash.

Most likely your alias won't work with the suggestion. You could eval with --only-command perhaps.

@amenk
Copy link
Contributor Author

amenk commented Aug 3, 2016

sh for me as well - acutally my host is switching from mysqldump5 to mysqldump - so not high prio for me any more. But still it would be good to be able to configure the commands used in Magerun - not in the shell. Currently mysqldump is just hardcoded - is not a problem to make it configurable and thus magerun more compatible. On the other hand I don't know if anybody hat this problem yet.

@tkn98
Copy link
Collaborator

tkn98 commented Aug 3, 2016

Well in your concrete case, it would have not helped you because there would have been no alias then when magerun exec'utes the (aliased) command.

Perhaps switching to the Process component helps here. Another ticket should exist for it, at least for review. (#796)

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

No branches or pull requests

3 participants