cli icon indicating copy to clipboard operation
cli copied to clipboard

Ctrl-C on fn start behaviour inconsistent

Open shaunsmith opened this issue 6 years ago • 1 comments

After running fn start in the foreground, Ctrl-C'ing the process sometimes stops the functions container and sometimes leaves it running. Working with new users I've seen them interrupting fn start and then reissuing the command only to be told the container 'functions' is already running. To avoid making casual users learn Docker, I suggest a few enhancements:

  1. Ctrl-C/SIGINT to fn start should shut down the functions container
  2. If someone issues fn start and the functions container is already running it should fail with an appropriate user friendly error message.
  3. Either add an argument to fn start like -f(orce) or add fn restart to shut down the current functions container and start a new one. I think "restart" is more explicit and would be the advice provided when the user tries to use "start" when a functions container is already running.

shaunsmith avatar Sep 29 '17 00:09 shaunsmith

i've noticed this also. ctrl-c feels like it should shut down but sometimes the container keeps running.

carimura avatar Sep 29 '17 01:09 carimura