Skip to content

Fix env var read#6

Merged
AspadaX merged 3 commits intomainfrom
fix-env-var-read
Jul 30, 2025
Merged

Fix env var read#6
AspadaX merged 3 commits intomainfrom
fix-env-var-read

Conversation

@AspadaX
Copy link
Owner

@AspadaX AspadaX commented Jul 29, 2025

Changes:

  • Move the ensure_trailing_slash function out of the original fn block for better readability and styling.
  • Allow using HF_ENDPOINT environment variable to alter the original hf-mirror.com url.

AspadaX added 3 commits July 29, 2025 13:21
- Document HF_ENDPOINT environment variable usage in README
- Move ensure_trailing_slash to module-level function
- Use HF_ENDPOINT from env with fallback to hf-mirror.com
- Clean up LargeFileInformation constructor and formatting
- Simplify path stripping in LFS file extraction
- Move base URL constants to new constants module
- Replace compile-time `option_env!` with runtime `env::var` for HF_ENDPOINT
- Use DEFAULT_BASE_URL constant as fallback
- Update all references to use new constants module
remove the trailing slash from the default base url
@AspadaX AspadaX self-assigned this Jul 29, 2025
@AspadaX AspadaX added bug Something isn't working enhancement New feature or request labels Jul 29, 2025
@AspadaX AspadaX merged commit 5e840ca into main Jul 30, 2025
14 checks passed
@AspadaX AspadaX deleted the fix-env-var-read branch July 30, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant