Ran into this during deployment using a dockerized implementation:
+ java -jar /opt/copybara/copybara_deploy.jar '' migrate copy.bara.sky push_examples_private_to_public ''
May 16, 2023 6:42:59 PM com.google.copybara.Main configureLog
INFO: Setting up LogManager
Copybara (Version: Unknown version)
0516 18:43:00.214 ERROR: Invalid subcommand ''. Available commands: [generator, help, info, migrate, onboard, validate, version]
0516 18:43:00.217 ERROR: Try 'copybara help'.
Because of the ordering in the [entrypoint.sh](https://github.com/google/copybara/blob/47ce5ccd468b46bf3a813a0ce3e83ee44fead192/.docker/entrypoint.sh#L17) script, it assumes there's some value to be passed for the COPYBARA_OPTIONS. Moving COPYBARA_SUBCOMMAND up the order in that script resolves the issue.
Note that we opted to use an ENTRYPOINT in the Dockerfile, so we're deviating a little bit from the existing Dockerfile, but because we wanted to abstract away all the command syntax from our devs and just expose the config options as envvars.
Ran into this during deployment using a dockerized implementation:
Because of the ordering in the
[entrypoint.sh](https://github.com/google/copybara/blob/47ce5ccd468b46bf3a813a0ce3e83ee44fead192/.docker/entrypoint.sh#L17)script, it assumes there's some value to be passed for the COPYBARA_OPTIONS. Moving COPYBARA_SUBCOMMAND up the order in that script resolves the issue.Note that we opted to use an ENTRYPOINT in the Dockerfile, so we're deviating a little bit from the existing Dockerfile, but because we wanted to abstract away all the command syntax from our devs and just expose the config options as envvars.