Skip to content

Commit

Permalink
fix: Mac/Linux: Fixed a command-related error message in the importer…
Browse files Browse the repository at this point in the history
… inspector even when the command is correct
  • Loading branch information
Cammin committed Dec 1, 2024
1 parent a7f1ae6 commit 5796eae
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,20 +287,6 @@ public bool HasCustomCommand(LdtkJson data, out string reason)
return false;
}

//ensure that there is a 2nd arg.
string[] split = Regex.Matches(command.Command, @"[\""].+?[\""]|[^ ]+")
.Cast<Match>()
.Select(m => m.Value)
.ToArray();

if (split.Length != 2 || split[1] != $"\"{ProjectName}\"")
{
reason = $"The command exists, but doesn't have a single parameter of the project name." +
$"\n" +
$"The command was this:\n{command.Command}";
return false;
}

reason = null;
return true;
}
Expand Down

0 comments on commit 5796eae

Please sign in to comment.