fix(menu): 补上 variety 的 ValidateSet 校验
根因:95853ec 新增「综艺整理」时只改了 $ActionPlan 与菜单项, [ValidateSet] 仍只有 rename/archive/extract-subs/check,右键点击在参数 绑定阶段即失败,动作根本执行不到。 改动:ValidateSet 增加 variety,与 $ActionPlan 的五个动作对齐。 实测:五个动作逐个传参均通过绑定并走到「没有收到要处理的路径」; 非法动作仍被拒绝;PowerShell AST 解析 0 错误。
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
#>
|
#>
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param(
|
param(
|
||||||
[ValidateSet('rename', 'archive', 'extract-subs', 'check')]
|
[ValidateSet('rename', 'archive', 'variety', 'extract-subs', 'check')]
|
||||||
[string]$Action = 'rename',
|
[string]$Action = 'rename',
|
||||||
[switch]$Pause,
|
[switch]$Pause,
|
||||||
[switch]$DryRun,
|
[switch]$DryRun,
|
||||||
|
|||||||
Reference in New Issue
Block a user