-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernized start
, stop
, restart
and new ensure
command
#4023
base: master
Are you sure you want to change the base?
Conversation
We should probably add an argument The reason I don't suggest adding a separate API function for this (e.g: Edit: since you'd need to upgrade So, it's up to you and whatever others think is best. |
Why do you need that when you can get the state of your resource before calling? A new argument doesn't improve readability |
I suggest to remove a new 'ensure' command and just change 'restart' behavior. Current 'restart' behavior is disappointing. |
I agree with this too, but would we want to change the behaviour of Technically that isn't backwards compatible, someone may rely on the fact a resource must be running when this function or command is called. Nonetheless, it would be much better behaviour for the restart command and function to start resources that aren't running, instead of doing nothing/returning false. |
Changing restart command functionality to support starting a resource even if it is stopped does not make sense, as the name implies a stop then a start, not just a start. New ensure command makes sense, it's practical. I support it. |
I guess we can discuss that later, but in a separate issue or pull request, this one is focused solely on improving the commands |
I want to introduce the new command because |
As far as I know, only FiveM has the I see no reason to have two commands with almost identical behavior instead of using one command with expected name.
I can't imagine a scenario when you need that. I would suggest writing a function that implements the old behavior if someone needs that. A failed restart commad forced me to use |
Modernized
start
,stop
,restart
commands which now also support directories, see the examples below, and a newensure
command, which restarts the already running resources specified as parameters, and starts the stopped ones.Closes #2549.