ci: use printf instead of heredoc for cargo config
Some checks failed
CI / check (push) Failing after 0s
CI / build (push) Has been skipped

This commit is contained in:
xfy 2026-06-12 17:04:17 +08:00
parent 8014e202f8
commit cb137cfdfb

View File

@ -25,13 +25,7 @@ jobs:
- name: Configure Cargo mirror - name: Configure Cargo mirror
run: | run: |
mkdir -p "$HOME/.cargo" mkdir -p "$HOME/.cargo"
cat > "$HOME/.cargo/config.toml" <<EOF printf '%s\n' '[source.crates-io]' "replace-with = 'ustc'" '' "[source.ustc]" 'registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"' > "$HOME/.cargo/config.toml"
[source.crates-io]
replace-with = 'ustc'
[source.ustc]
registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"
EOF
- name: Install Node.js - name: Install Node.js
run: | run: |
@ -77,13 +71,7 @@ jobs:
- name: Configure Cargo mirror - name: Configure Cargo mirror
run: | run: |
mkdir -p "$HOME/.cargo" mkdir -p "$HOME/.cargo"
cat > "$HOME/.cargo/config.toml" <<EOF printf '%s\n' '[source.crates-io]' "replace-with = 'ustc'" '' "[source.ustc]" 'registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"' > "$HOME/.cargo/config.toml"
[source.crates-io]
replace-with = 'ustc'
[source.ustc]
registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"
EOF
- name: Install Node.js - name: Install Node.js
run: | run: |