Skip to content

Commit

Permalink
handle nikola help differently (via 45902da)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 2, 2015
1 parent 45902da commit 82aab2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nikola/__main__.py
Expand Up @@ -96,11 +96,12 @@ def main(args=None):
# the output of that command (the new site) in an unknown directory that is
# not the current working directory. (does not apply to `version`)
argname = args[0] if len(args) > 0 else None
if argname and argname not in ['init', 'version', 'help'] and not argname.startswith('import_'):
if argname and argname not in ['init', 'version'] and not argname.startswith('import_'):
root = get_root_dir()
if root:
os.chdir(root)
needs_config_file = True
# help does not need a config file, but can use one.
needs_config_file = argname != 'help'
else:
needs_config_file = False

Expand Down

0 comments on commit 82aab2a

Please sign in to comment.