Skip to content

apt-get update / install without -y causes setup hang #742

@uuf6429

Description

@uuf6429

https://github.com/shivammathur/php-ubuntu/blob/d752c0e323638e3fa5ae13654ab4935d7432657d/scripts/install.sh#L31

I'm trying to run shivammathur/setup-php@v2 through act, however it hangs up indefinitely.

So I connected a term session to the container, checked where it is stuck and manually checked through the running scripts:

root        19     0  0 19:15 pts/1    00:00:00 node /var/run/act/actions/shivammathur-setup-php@v2/dist/index.js
root        35    19  0 19:15 pts/1    00:00:00  \_ /usr/bin/bash /run/act/actions/shivammathur-setup-php@v2/src/scripts/run.sh
root        49    35  0 19:15 pts/1    00:00:00      \_ bash /tmp/install.sh 7.4 release
root       117    49  0 19:15 pts/1    00:00:00          \_ sudo apt --fix-broken install
root       118   117  0 19:15 pts/2    00:00:00              \_ sudo apt --fix-broken install
root       119   118  0 19:15 pts/2    00:00:00                  \_ apt --fix-broken install

Running the command manually (after manually deleting the apt lock), it asks me for confirmation; which I suppose is the root cause of the hang.

After some detective work, it seems that the code of install.sh is coming from this repository (I'm guessing is the script I linked at the top).

Wouldn't the following fix the problem?

    sudo apt --fix-broken install -y || (sudo apt-get update -y && sudo apt --fix-broken install -y)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions