Skip to content

Commit e4698f8

Browse files
committed
feat: match terms case-insensitively
1 parent dd32575 commit e4698f8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

host-targets.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ HostTargets.TERMS = {
107107
// meta, test, misc
108108
test: {},
109109
};
110+
{
111+
let keys = Object.keys(HostTargets.TERMS);
112+
for (let key of keys) {
113+
let lkey = key.toLowerCase();
114+
HostTargets.TERMS[lkey] = HostTargets.TERMS[key];
115+
}
116+
}
110117

111118
HostTargets._MATCHERS = {
112119
// seems to be some sort of android-specific kernel build hash
@@ -130,7 +137,8 @@ HostTargets.termsToTarget = function (target, terms) {
130137
Object.assign(target, { errors: [] });
131138

132139
for (let term of terms) {
133-
let hints = HostTargets.TERMS[term];
140+
let lterm = term.toLowerCase();
141+
let hints = HostTargets.TERMS[lterm];
134142
if (hints) {
135143
upsertHints(target, terms, term, hints);
136144
continue;

0 commit comments

Comments
 (0)