Skip to content

Commit f12b58f

Browse files
committed
Adding consistency to args for makecalogs
1 parent 3fea144 commit f12b58f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ After adding a hook to your pre-commit config, it's not a bad idea to run `pre-c
115115

116116
This hook runs the "makecatalogs" command to ensure all referenced packages are present and catalogs are up to date.
117117

118+
- Specify an alternate munki repo location by passing the argument:
119+
`args: ['--munki-repo', './my_repo_location']`
120+
(default: ".")
121+
118122
## Note about combining arguments
119123

120124
When combining arguments that take lists (for example: `--required-keys`, `--catalogs`, and `--categories`), only the _last_ list needs to have a trailing `--`. For example, if you use the check-munki-pkgsinfo hook with only the `--catalogs` argument, your yaml config would look like this:

pre_commit_hooks/munki_makecatalogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def build_argument_parser():
1515
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
1616
)
1717
parser.add_argument(
18-
"--munki_repo", default=".", help="Path to local Munki repo. (Defaults to '.')"
18+
"--munki-repo", default=".", help="Path to local Munki repo. (Defaults to '.')"
1919
)
2020
# TODO: Support makecatalogs options, ideally with kwargs for flexibility.
2121
return parser

0 commit comments

Comments
 (0)