Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Forward upstream exit code on `cloudron exec`

    App Packaging & Development
    2
    3
    134
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nebulon
      nebulon Staff last edited by

      One takeaway from the meetup yesterday, if cloudron exec runs a remote command and exits, it will not forward the remote command's exit code, but basically always returns 0. This makes it harder to be used in piplines or shell scripts.

      We should be able to get the remote exit code and then set that one as the cloudron exit code.

      1 Reply Last reply Reply Quote 2
      • girish
        girish Staff last edited by

        We need to add a separate API to get exit status of exec container.

        1 Reply Last reply Reply Quote 0
        • girish
          girish Staff last edited by girish

          This is implemented in 7.2.1.

          ~$ cloudron exec --app orkut -- bash -c 'exit 42'
          ~$ echo $?
          42
          
          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          Powered by NodeBB