Skip to content

Check exit code of install script #88

@Boy132

Description

@Boy132

Currently wings ignores the output of the install script itself and returns a "successfull" install even if an error happened. Ideally it should check for any errors happening when running the install script and/ or check the exit code of the script.
If possible the error message and the exit code should be reported back to the panel so we can display that on the frontend.

wings/server/install.go

Lines 500 to 503 in b0d18ec

sChan, eChan := ip.client.ContainerWait(ctx, r.ID, container.WaitConditionNotRunning)
select {
case err := <-eChan:
// Once the container has stopped running we can mark the install process as being completed.

if serr := s.SyncInstallState(err == nil, reinstall); serr != nil {

Test case: set the install script of an egg to exit 1, setup a server with this egg and trigger an install. Wings will return the installation as "successfull" while it should be "failed".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions