You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We're setting up a subcommand which will automatically import a .sql file into mysql running inside a container. This contains the < symbol, as that required to import the dump, but this doesn't seem to work within the dip context.
To Reproduce
Steps to reproduce the behaviour:
# dip.yml
mysql:
description: Run mysql console
service: mysql
command: mysql -h mysql_no -u root -d app_development
subcommands:
import:
description: import the specified file into the development database
service: mysql
command: mysql -h mysql -u root -proot app_development < MySQL.sql
# command run
$ dip mysql import
# Output
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using EditLine wrapper
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
snip...
We've been able to bypass this by removing the < MySQL.sql portion of the command, and instead passing that in via the CLI when we run the command, i.e. dip mysql import < MySQL.sql - but would prefer for it to be all inclusive within the dip.yml file.
Expected behavior
It should import the database
Context (please complete the following information):
OS: MacOS 11.1
Version 6.1.0
The text was updated successfully, but these errors were encountered:
where arguments are passed as Array. And that's why we cannot use special symbols. https://www.rubydoc.info/stdlib/core/Process.exec
Ruby invokes the command directly without the shell.
I'm trying to remember the reason why I choose that, but I can't :)
So, I need time to investigate it again, but I don't promise you that it will be fast because I little bit swamped on the current project.
Describe the bug
We're setting up a subcommand which will automatically import a .sql file into mysql running inside a container. This contains the
<
symbol, as that required to import the dump, but this doesn't seem to work within the dip context.To Reproduce
Steps to reproduce the behaviour:
We've been able to bypass this by removing the
< MySQL.sql
portion of the command, and instead passing that in via the CLI when we run the command, i.e.dip mysql import < MySQL.sql
- but would prefer for it to be all inclusive within thedip.yml
file.Expected behavior
It should import the database
Context (please complete the following information):
The text was updated successfully, but these errors were encountered: