Skip to content

Commit

Permalink
added warning about strange formats in minions.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwin Dondorp committed Feb 6, 2021
1 parent a5009d9 commit 16f9592
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion saltgui/static/scripts/panels/Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ export class Panel {
const fields = line.split(/[ \t]+/);
if (fields.length === 1) {
minions[fields[0]] = "true";
} else {
} else if (fields.length === 2) {
minions[fields[0]] = fields[1];
} else {
console.warn("lines in 'minions.txt' must have 1 or 2 words, not " + fields.length + " like in: " + line);
}
}
Utils.setStorageItem("session", "minions-txt", JSON.stringify(minions));
Expand Down

0 comments on commit 16f9592

Please sign in to comment.