Command is skipped after running command-chain


I’m trying to use the command-chain feature, so i don’t have to make a wrapper for the actual command.

This is my apps-part of my snapcraft.yaml:

    command-chain: [ bin/init ]
    command: bin/issue
      - network

When running my-app.issue the script init is running fine, but issue is never executed.

If I remove the command-chain the command is executed.

So I’m wondering if there’s something I need to return or something from the init-script, (like “init successfully”) for the command to execute.

Anyone having a clue why this is happening?

Thank you in advance.

The last line of bin/init should be exec $@ so that bin/issue continues to run in the same execution context and with whatever parameters it might happen to have.

You need to be careful then that you haven’t happened to have modified any of the parameters that are being sent to bin/issue such as if you’ve used the shift command in bin/init but if you haven’t then the one line above should be all you need to worry about.


Ah, thank you so much. bin/init ins’t manipulating the parameters. Thank you so much for your help. :slight_smile: