diff --git a/tlwiki b/tlwiki index d1c5768..15acf22 100755 --- a/tlwiki +++ b/tlwiki @@ -4,6 +4,7 @@ import argparse import yaml import subprocess +import sys # Valid commands @@ -25,7 +26,11 @@ parser.add_argument('--config', '-c', type=argparse.FileType('r'), help='Configuration file') -args = parser.parse_args() +if sys.argv[0] == '.git/hooks/pre-push': + args = parser.parse_args(['deploy']) +else: + args = parser.parse_args() + # load config yaml into config dict config = yaml.safe_load(args.config)