diff options
-rw-r--r-- | jtlib/plugins/new_topic_plugin.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jtlib/plugins/new_topic_plugin.py b/jtlib/plugins/new_topic_plugin.py index 1114bb4..38b4e55 100644 --- a/jtlib/plugins/new_topic_plugin.py +++ b/jtlib/plugins/new_topic_plugin.py @@ -37,9 +37,10 @@ class NewTopicCommand(cliapp.Plugin): pathname = self._topic_pathname(args[0]) self._create_topic_page(pathname, args[1]) - jtlib.commit_to_git(self.app.settings['source'], [pathname]) - if self.app.settings['push']: - jtlib.push_git(self.app.settings['source']) + if self.app.settings['git']: + jtlib.commit_to_git(self.app.settings['source'], [pathname]) + if self.app.settings['push']: + jtlib.push_git(self.app.settings['source']) def _topic_pathname(self, page_path): return os.path.join(self.app.settings['source'], page_path + '.mdwn') |