Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/function/maintain/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ class 配置信息:

必填项: list[str] = [
"paths.winget-pkgs",
"paths.winget-tools",
"repos.winget-pkgs",
"repos.winget-tools"
"repos.winget-pkgs"
]

最新版本: str = "1.4"
Expand Down
6 changes: 5 additions & 1 deletion src/tools/maintain/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def 递归获取输入(配置字典: dict[str, Any], 当前路径: str="") -> No

for 键 in ("paths", "repos"):
# 必须要用户给的配置项
递归获取输入(默认配置[键], 键)
默认配置[键]["winget-pkgs"] = 获取用户输入(f"{键}.winget-pkgs")

if input(f"{MSHead.OptionalQuestion} 继续设置其他配置项? (默认为{Fore.YELLOW}否{Fore.RESET}): ").lower() in YES:
for 键 in list(默认配置.keys()):
Expand All @@ -120,6 +120,10 @@ def 递归获取输入(配置字典: dict[str, Any], 当前路径: str="") -> No
if input(f"{MSHead.Question} 是否修改缓存配置? (默认为{Fore.YELLOW}否{Fore.RESET}): ").lower() in YES:
递归获取输入(默认配置["cache"], "cache")

if input(f"{MSHead.OptionalQuestion} 是否使用 ({Fore.YELLOW}将在未来弃用的{Fore.RESET}) sundry ignore? (默认为{Fore.YELLOW}否{Fore.RESET}): ").lower() in YES:
for 键 in ("paths", "repos"):
默认配置[键]["winget-tools"] = 获取用户输入(f"{键}.winget-tools")

if not os.path.exists(os.path.dirname(配置信息.所在位置)):
os.makedirs(os.path.dirname(配置信息.所在位置), exist_ok=True)

Expand Down
Loading