Skip to content

Commit 352dbc8

Browse files
tulinkryVladimir Kotal
authored andcommitted
relaxing the constraint of non-empty pattern (#1640)
fixes #1626
1 parent a62f14a commit 352dbc8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/org/opensolaris/opengrok/configuration/Groups.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ public static void main(String[] argv) {
168168
deleteGroup(cfg.getGroups(), groupname);
169169
out = prepareOutput(outFile);
170170
printOut(list, cfg, out);
171-
} else if (groupname != null && grouppattern != null) {
171+
} else if (groupname != null) {
172+
if (grouppattern == null) {
173+
grouppattern = "";
174+
}
172175
// perform insert/update. parent may be null
173176
if (!modifyGroup(cfg.getGroups(), groupname, grouppattern, parent)) {
174177
System.err.println("Parent group does not exist \"" + parent + "\"");

tools/Groups

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ Add ()
449449
done
450450

451451
[ -z "$NAME" ] && echo "name must be specified" && LocalUsage && exit 5
452-
[ -z "$PATTERN" ] && echo "pattern must be specified" && LocalUsage && exit 5
453452

454453
CheckInputFile
455454
Info

0 commit comments

Comments
 (0)