mirror of
https://github.com/munki/munki.git
synced 2025-12-30 11:09:57 -06:00
munkiimport: if no options or arguments are given, print usage
This commit is contained in:
@@ -260,6 +260,12 @@ def main():
|
||||
|
||||
sys.argv = [unicode(item, 'utf-8') for item in sys.argv]
|
||||
options, arguments = parser.parse_args()
|
||||
|
||||
# there are a lot of valid combinations of option flags and arguments
|
||||
# but if there are no option flags or arguments we should print usage
|
||||
if len(sys.argv) == 1:
|
||||
parser.print_usage()
|
||||
exit(0)
|
||||
|
||||
if options.version:
|
||||
print info.get_version()
|
||||
|
||||
Reference in New Issue
Block a user