Skip to content

Commit

Permalink
New 'auto_command_starting' signal when 'nikola auto' is starting. (#…
Browse files Browse the repository at this point in the history
…3513)

* New 'auto_command_starting' signal when 'nikola auto' is starting.

* Move auto_command_starting to a better place

Co-authored-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
matthew16550 and Kwpolska committed Feb 18, 2021
1 parent 9b3f0c3 commit f86046f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
New in master
=============

Features
--------

* New ``auto_command_starting`` signal when ``nikola auto`` is
starting

New in v8.1.3
=============

Expand Down
3 changes: 3 additions & 0 deletions nikola/plugins/command/auto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import typing
import webbrowser

import blinker
import pkg_resources

from nikola.plugin_categories import Command
Expand Down Expand Up @@ -149,6 +150,8 @@ def _execute(self, options, args):
elif Observer is None:
req_missing(['watchdog'], 'use the "auto" command')

blinker.signal('auto_command_starting').send(self.site)

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

0 comments on commit f86046f

Please sign in to comment.