Skip to content

Commit

Permalink
Fixed typos in server start and type error in message
Browse files Browse the repository at this point in the history
- Added space between the theme name and the --buildDrafts option
- Changed string concatenation to format string (otherwise +server["PORT"] will fail if it is an int and not explicitly cast to a string)
- sublime.status_message(out) was failing as out is a Popen process, not a string, changed it to a relevant status message
  • Loading branch information
eschlon authored Sep 23, 2016
1 parent 03adbe1 commit da58c0a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Hugofy.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ def run(self,edit):
server=settings.get("Server")
theme=settings.get("DefaultTheme")
try:
out=subprocess.Popen("hugo server --theme="+theme+"--buildDrafts --watch --port="+server["PORT"],stderr=subprocess.STDOUT,universal_newlines=True)
sublime.status_message(out)
startCmd = "hugo server --theme={} --buildDrafts --watch --port={}".format(theme, server["PORT"])
out=subprocess.Popen(startCmd,stderr=subprocess.STDOUT,universal_newlines=True)
sublime.status_message('Server Started: {}'.format(startCmd))
except:
sublime.error_message("Error starting server")

Expand Down

0 comments on commit da58c0a

Please sign in to comment.