docker-entrypoint.sh 498 B

12345678910111213141516171819
  1. #!/bin/bash
  2. CONFIG_FILE=~/.cargo/config.toml
  3. change_rust_src_to_official() {
  4. echo -e "[source.crates-io] \n \
  5. registry = \"sparse+https://index.crates.io/\" \n \
  6. [net] \n \
  7. git-fetch-with-cli = true \n \
  8. " > $CONFIG_FILE
  9. }
  10. # Check if the GITHUB_WORKFLOW environment variable is set and not empty
  11. if [ -n "$GITHUB_ACTION" ]; then
  12. change_rust_src_to_official
  13. fi
  14. exec "$@"