Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
trigger: fix schema
Baptiste Daroussin committed 2 years ago
commit ec16d25f5cb6319342548ec3119cb750c30b3771
parent 5fa76a1
1 file changed +19 -7
modified libpkg/triggers.c
@@ -68,16 +68,28 @@ trigger_open_schema(void)
		"  properties {"
		"    description: { type = string };"
		"    path: { "
-
		"      type = array; "
-
		"      item = { type = string };"
+
		"      anyOf = [{"
+
		"        type = array; "
+
		"        item = { type = string };"
+
		"      }, {"
+
		"        type = string;"
+
		"      }]"
		"    };"
		"    path_glob: { "
-
		"      type = array; "
-
		"      item = { type = string };"
+
		"      anyOf = [{"
+
		"        type = array; "
+
		"        item = { type = string };"
+
		"      }, {"
+
		"        type = string;"
+
		"      }]"
		"    };"
		"    path_regexp: { "
-
		"      type = array; "
-
		"      item = { type = string };"
+
		"      anyOf = [{"
+
		"        type = array; "
+
		"        item = { type = string };"
+
		"      }, {"
+
		"        type = string;"
+
		"      }]"
		"    };"
		"    cleanup = { "
		"      type = object; "
@@ -104,7 +116,7 @@ trigger_open_schema(void)
		"      required = [ type, script ];"
		"    };"
		"  }\n"
-
		"  required = [ description, trigger ];"
+
		"  required = [ trigger ];"
		"}";

	parser = ucl_parser_new(UCL_PARSER_NO_FILEVARS);