Skip to content

Commit

Permalink
feat: 参数解析形如 "xx", "xxx" 的任务
Browse files Browse the repository at this point in the history
  • Loading branch information
Dissectum committed Oct 2, 2023
1 parent 4b144eb commit e552748
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MBA.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ static bool ProcArgs(string[] args)
var taskList = new List<TaskType>();
foreach (string arg in args)
{
var value = arg.Replace("\"", "").Replace(",", "");
if (string.IsNullOrWhiteSpace(arg)) continue;
var value = arg;

if (CheckAdbAddress(value, out var address))
{
Config.Core.AdbAddress = address;
Expand Down Expand Up @@ -293,7 +295,7 @@ static bool SetTasks()
return true;
}

var taskIds = read.Split(' ');
var taskIds = read.Split(' ', ',', '"');
return ProcArgs(taskIds);
}

Expand Down

0 comments on commit e552748

Please sign in to comment.