Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
Update graphene_django_hook.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored Jun 12, 2020
1 parent 33cb415 commit 88e4233
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions graphene_django_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
parser.add_argument('--out', default=None)
parser.add_argument('--schema', default=None)
parser.add_argument('-v', '--verbosity', default=None)
parser.add_argument('--managepy-path', default='manage.py')
parser.add_argument('--managepy-path', default=None)
parser.add_argument('--settings', default=None)
args = parser.parse_args(argv)

command = './{} graphql_schema'.format(args.managepy_path)
# TODO: Fix parsing arguments
command = './{} graphql_schema'.format(args.managepy_path or 'manage.py')

if args.settings is not None:
command += ' --settings={}'.format(args.settings)
Expand All @@ -53,7 +54,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
if args.verbosity is not None:
command += ' --verbosity={}'.format(args.verbosity)

command = 'chmod +x {} && {}'.format(args.managepy_path, command)
run_command('chmod +x {}'.format(args.managepy_path or 'manage.py'))
return run_command(command)


Expand Down

0 comments on commit 88e4233

Please sign in to comment.