Closed chriscroome closed 5 years ago
Will look into this! (btw it's PHP not Phython :) )
Hi, this should be a typo in the code, so this:
php console site:add --name='foo' --urls=https://bar.example.com, https://baz.example.com
Should work in next release - there the first url is the primary url.
Fixed in 0.1.0-alpha10
The help for
site:add
suggests that one than one URL can be added at a time:However if you add more than one URL, space separated:
It results in:
If comers are used:
It results in:
This is what is needed, the
main_url
column should just contain the main URL for the site and other URL's should be in thesite_url
table cross referenced via theidsite
column.So either the
urls
argument needs to be a bit cleverer in the manner in which it handles input, for example splitting the first URL from subsequent ones and then correctly inserting them into the database or perhaps it would make sense to have two command line options, one for themain_url
column in thesite
table and another option to update thesite_url
table?Another thing to consider is the possible need for a
site:update
command to update things like the list ofurl
's in thesite_url
table?I'm sorry that I'm not a Python programmer so I'm not in a position to help with suggested enhancements like this other than by suggesting features and testing them.
For consistency with the database perhaps the command line options could be:
With
urls
requiring one URL per line?