db-create --automatic prompting when a different schema/namespace is specified
When using CW_DB_NAMESPACE: published
we get :
# -c echo "checking postgresql database $CW_DB_NAME if it doesn't exist, create it with db-create"; [ "$(PGPASSWORD=$CW_DB_PASSWORD psql -h $CW_DB_HOST -p $CW_DB_PORT -d template1 -tAc "SELECT 1 FROM pg_database WHERE datname='$CW_DB_NAME'")" = '1' ] || cubicweb-ctl db-create $(CW_INSTANCE) -a echo "done"
Traceback (most recent call last):
File "/usr/bin/cubicweb-ctl", line 11, in <module>
load_entry_point('cubicweb==3.28.3', 'console_scripts', 'cubicweb-ctl')()
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 830, in run
CWCTL.run(args)
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 149, in run
sys.exit(command.main_run(args, rcfile))
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 290, in main_run
self.run(args)
File "/usr/lib/python3/dist-packages/cubicweb/server/serverctl.py", line 393, in run
% (namespace, dbname)):
File "/usr/lib/python3/dist-packages/logilab/common/shellutils.py", line 411, in confirm
answer = self.ask(question, ("y", "n"), default)
File "/usr/lib/python3/dist-packages/logilab/common/shellutils.py", line 389, in ask
answer = self._input(prompt).strip().lower()
EOFError: EOF when reading a line
Create schema published in database service-map ? [Y/n]: done
The convoluted shell program at the start (you've guessed it's in kubernetes) will probably be simplified once #202 (closed) is used (3.30 I guess).