servdhost / craft-asset-storage

MIT License
10 stars 1 forks source link

[FR] Option/flag to skip (yes/no) prompt for sync commands #75

Closed turnstylerj closed 8 months ago

turnstylerj commented 11 months ago

I often run commands that take a while like pull-database or pull-assets in my local environment to sync things up before I start a new task, and sometimes I'll forget about the (yes/no) prompt and realize my machine has just been sitting there waiting for confirmation while I stepped away for a coffee. This makes me sad.

I keep my CLI snippets saved, so I know I'm running exactly what I intend every time, and it'd be nice to have a --force-type flag I could add to these commands to skip the prompt.

joeforshaw commented 8 months ago

Hey @turnstylerj! If you add the --interactive, --from and --to flags to your command then that should skip the prompts like you need. The --servdSlug and --servdKey flags should be auto-populated by your SERVD_PROJECT_SLUG and SERVD_SECURITY_KEY if they're set, but you pass those explicitly if you need.

Got an example over on docs page https://servd.host/docs/servd-plugin-console-commands

turnstylerj commented 8 months ago

Oh nice, looks like --interactive was what I was missing. Cheers!