danhale-git / craft

Deploy and manage mc bedrock servers
Apache License 2.0
0 stars 0 forks source link

Craft commands do not wait for server commands to exit before continuing #40

Closed danhale-git closed 3 years ago

danhale-git commented 3 years ago

This is probably the case for all commands, except start which handles it here. This behaviour should probably be moved to the docker.Container.Command function, waiting for the command to return before the function returns.

danhale-git commented 3 years ago

This wasn't necessary in places where the final action isn't to run a server CLI command. That is the case with start and run, both of which leverage craft.Runserver which waits for the server initialisation to complete. The backup command waits for the final save resume to return so that leaves the cmd command. This commit fixes cmd: https://github.com/danhale-git/craft/commit/b066fc1424d91b46e42575bb610f45fb30073809