vv icon indicating copy to clipboard operation
vv copied to clipboard

Way to pass "N" or "No" to some of the create arguments

Open tmuka opened this issue 9 years ago • 2 comments

I know i can pass some of these command line flags for vv create, but is it possible to pass N or No to them so i'm not prompted interactively?

Install as multisite? (y/N):
 Local SQL file to import for database (leave blank to skip):
 Add sample content to site (y/N):
 Enable WP_DEBUG and WP_DEBUG_LOG (y/N):

tmuka avatar Sep 29 '16 19:09 tmuka

I arrived here also looking for an answer, trying to create a non-interactive install script

scarstens avatar Dec 09 '16 22:12 scarstens

found 2 solutions, first it looks like if you pass --default its supposed to automatically choose default values or bypass the interactive nature of the script. That said, I couldn't ever get it to work, it just stalled when I used it. the second option was to pipe in the default answers. I haven't tested this to completion, but it definitely "appears" to work from the CLI responses I get.

# BUILD VVV SITE USING VV NON-INTERACTIVE
echo "Autmated VV Script V9"
echo "y" | vv \
 --defaults \
 --debug-vv create \
 -d automatedvv.dev -n automatedvv.dev \
 -f -i -x -m subdomain \
 -rd \
 -db false \
 -wv "latest" \
 -gr false \
 -sc \
 -u "fansided.com"
echo "END Autmated VV Script V9"

scarstens avatar Dec 09 '16 23:12 scarstens