Skip to content

Commit

Permalink
Merge pull request #1778 from getnikola/do-1762
Browse files Browse the repository at this point in the history
fix #1762
  • Loading branch information
ralsina committed Jun 2, 2015
2 parents 19a9085 + 29aba4a commit 627b57e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,7 @@ New in master
Features
--------

* New --get-path option for ``nikola install_theme`` (Issue #1762)
* New `nikola rst2html` command (Issue #1710)
* New `nikola status` command (Issue #1740)
* Support [code] in wordpress importers (Issue #1186)
Expand Down
16 changes: 16 additions & 0 deletions nikola/plugins/command/install_theme.py
Expand Up @@ -88,6 +88,14 @@ class CommandInstallTheme(Command):
"https://themes.getnikola.com/v7/themes.json)",
'default': 'https://themes.getnikola.com/v7/themes.json'
},
{
'name': 'getpath',
'short': 'g',
'long': 'get-path',
'type': bool,
'default': False,
'help': "Print the path for installed theme",
},
]

def _execute(self, options, args):
Expand All @@ -102,6 +110,14 @@ def _execute(self, options, args):
else:
name = None

if options['getpath'] and name:
path = utils.get_theme_path(name)
if path:
print(path)
else:
print('not installed')
exit(0)

if name is None and not listing:
LOGGER.error("This command needs either a theme name or the -l option.")
return False
Expand Down

0 comments on commit 627b57e

Please sign in to comment.