go-sync
go-sync copied to clipboard
exec-finish commands defined in multi line syntax do not work
This is currently not working and throw an "Command not found" error:
exec-finish:
- type: local
command:
- "echo 'Hallo'"
This instead works:
exec-finish:
- type: local
command: "echo 'Hallo'"
Depending on the line syntax, the commands get quoted differently: https://github.com/webdevops/go-sync/blob/9bb75832f780306dea5a4650821f6f91ba4fcac4/sync/execution.go#L53
This call works: connection.RawShellCommandBuilder(execution.Command.Single)
This not: connection.ShellCommandBuilder(execution.Command.Multi...)
But also the single line version has a wired behaviour:
The command ct docker:cli database:updateschema is not working on local side. Remote all is fine.
As a workaround, i'm currently doing this:
exec-finish:
- type: local
command: "docker-compose exec -T --user application app /bin/bash -c '/app/vendor/bin/typo3cms database:updateschema'"