fix: sync -c effective config + --cn Gitee mirror fixes to v1 - #98
Merged
Conversation
added 2 commits
August 7, 2026 12:08
Add a --cn flag that forces all downloads to the Gitee mirror for users in mainland China where raw.githubusercontent.com is unreliable. Changes: - Pre-scan args for --cn before downloading the installer framework (framework URL itself must use the correct source) - Switch INSTALLER_URL to Gitee when --cn is set - Parameterize GIT_REPO / GIT_RAW_BASE / GIT_RAW_SEP / PIPOWER5_DTBO_URL (Gitee raw URL format needs a /raw/ segment) - Replace all hardcoded GitHub URLs in install.sh with the variables - Fix install report label to show Gitee (--cn) Usage: curl -sSL https://gitee.com/sunfounder/pironman5/raw/1.3.x/install.sh | sudo bash -s -- --cn
- Extract build_effective_config() to utils.py (shared by app & CLI) - Fix empty-file JSONDecodeError (missing else in content=='' branch) - -c now outputs effective config: defaults + file overrides + auto→system migration - Remove Pironman5.upgrade_config (now handled by shared function) - Update test_cli_show_config.py to test the real shared function (7 scenarios)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sync two fixes from the frozen 1.3.x line to v1 (the current main branch). These were originally merged to 1.3.x but v1 (newer main line) still lacks them.
-ceffective config fix (original PR cli: fix -c to show effective config instead of raw file content #96):pironman5 -cnow shows the effective config (defaults + file merge) viabuild_effective_config()instead of printing rawconfig.json; fixes empty-file JSONDecodeError.--cnGitee mirror flag (original PR feat: add --cn flag to install from Gitee mirror (China) #97): forces all installer downloads (framework, version probes, git clone, dtbo) to the Gitee mirror for users in mainland China whereraw.githubusercontent.comis unreliable.Changes
install.sh:--cnflag, pre-scan args, parameterizedGIT_REPO/GIT_RAW_BASE/GIT_RAW_SEP/PIPOWER5_DTBO_URLpironman5/_cli.py,pironman5/pironman5.py,pironman5/utils.py: effective-config logictests/test_cli_show_config.py: tests for-cCherry-picked cleanly (no conflicts) from
50fd044dand72301ef1.How to test
Note: Gitee mirror may lag; the branch is being pushed to Gitee as well.