Parse HF_USER with NO_COLOR to avoid incorrectly capturing bash ANSI codes (#3119)

This commit is contained in:
Johnson Sun
2026-03-10 01:47:58 +08:00
committed by GitHub
parent 885ef91892
commit 96b7f3dae0
+1 -1
View File
@@ -165,7 +165,7 @@ hf auth login --token ${HUGGINGFACE_TOKEN} --add-to-git-credential
Then store your Hugging Face repository name in a variable:
```bash
HF_USER=$(hf auth whoami | awk -F': *' 'NR==1 {print $2}')
HF_USER=$(NO_COLOR=1 hf auth whoami | awk -F': *' 'NR==1 {print $2}')
echo $HF_USER
```