Skip to content

Commit

Permalink
Merge pull request #153 from brunoamaral/152-hardcoded-hugo-path
Browse files Browse the repository at this point in the history
get path of hugo command to run build
  • Loading branch information
brunoamaral authored Jun 26, 2022
2 parents 502d875 + 16b695a commit 86855e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os
import pandas as pd
import pathlib
from shutil import which
import sqlalchemy
import subprocess
import time
Expand Down Expand Up @@ -279,7 +280,7 @@
## BUILD THE WEBSITE
####
''')
args = ("/usr/local/bin/hugo", "-d", WEBSITE_PATH,"--cacheDir", GREGORY_DIR)
args = (which('hugo'), "-d", WEBSITE_PATH,"--cacheDir", GREGORY_DIR)
popen = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True)
popen.wait()
output = popen.stdout.read()
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import shutil
import subprocess
import sys
from shutil import which

# TO DO: Run docker-compose up as root

Expand Down Expand Up @@ -126,7 +127,7 @@ def is_git_repo(path):
####
''')

args = ("/usr/local/bin/hugo", "mod", "get","-u")
args = (which('hugo'), "mod", "get","-u")
popen = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True)
popen.wait()
output = popen.stdout.read()
Expand Down

0 comments on commit 86855e9

Please sign in to comment.