Skip to content

Commit

Permalink
More helpful CLI errors when dockermakefile can't be found
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Virshup authored and Aaron Virshup committed May 22, 2017
1 parent 9b30880 commit 572e6f4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dockermake/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"""
from __future__ import print_function
import os
import sys

from . import cli, utils, staging
from .imagedefs import ImageDefs
Expand All @@ -43,11 +44,12 @@ def main():
return

if not os.path.exists(args.makefile):
print('No docker makefile found at path "%s"'%args.makefile)
if args.makefile == 'DockerMake.yml':
parser.print_help()
return
else:
raise IOError('No docker makefile found at path "%s"' % args.makefile)
print('Type `docker-make --help` to see usage.')
sys.exit(1)



defs = ImageDefs(args.makefile)

Expand Down

0 comments on commit 572e6f4

Please sign in to comment.