Skip to content
Permalink
Browse files

auto: Avoid depending on nikola executable in $PATH

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 31, 2017
1 parent 86adc66 commit 0fdadf56535a3e375cb6c85925e23ec90252d81e
Showing with 5 additions and 1 deletion.
  1. +5 −1 nikola/plugins/command/auto/__init__.py
@@ -127,7 +127,11 @@ def _execute(self, options, args):
elif Observer is None:
req_missing(['watchdog'], 'use the "auto" command')

self.nikola_cmd = ['nikola', 'build']
if sys.argv[0].endswith('__main__.py'):
self.nikola_cmd = [sys.executable, '-m', 'nikola', 'build']
else:
self.nikola_cmd = [sys.argv[0], 'build']

if self.site.configuration_filename != 'conf.py':
self.nikola_cmd.append('--conf=' + self.site.configuration_filename)

0 comments on commit 0fdadf5

Please sign in to comment.
You can’t perform that action at this time.