Skip to content

Commit

Permalink
Merge pull request amperka#113 from 12qu/master
Browse files Browse the repository at this point in the history
Check project directory before processing args
  • Loading branch information
nkrkv committed Sep 24, 2013
2 parents e782d73 + 61bf0b9 commit 9ec8aa7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ino/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,15 @@ def main():
args = parser.parse_args()

try:
e.process_args(args)

# Create a .build directory if required
valid_project = os.path.isdir(e.src_dir)
run_anywhere = "init clean list-models serial"

in_project_dir = os.path.isdir(e.src_dir)
if not in_project_dir and current_command not in run_anywhere:
raise Abort("No project found in this directory.")

e.process_args(args)

if current_command not in run_anywhere:
if not valid_project:
raise Abort("No project found in this directory.")

# For valid projects create .build & lib
if not os.path.isdir(e.build_dir):
os.makedirs(e.build_dir)
Expand Down

0 comments on commit 9ec8aa7

Please sign in to comment.