ci: use printf instead of heredoc for cargo config
This commit is contained in:
parent
8014e202f8
commit
cb137cfdfb
@ -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: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user