Skip to content

Commit

Permalink
🚗 Use an absolute path for GOPATH directory
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Jan 2, 2024
1 parent ad031be commit f2d722f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def run(self):
os.path.dirname(os.path.abspath(__file__)), "python_hugo", "binaries"
)

os.environ["GOPATH"] = os.path.abspath(HUGO_CACHE_DIR)

# Build Hugo from source using the Go toolchain, place it into GOBIN
# Requires the following dependencies:
#
Expand All @@ -74,7 +76,7 @@ def run(self):
"-tags",
"extended",
],
cwd=os.path.join(HUGO_CACHE_DIR, f"hugo-{HUGO_VERSION}"),
cwd=os.path.abspath(os.path.join(HUGO_CACHE_DIR, f"hugo-{HUGO_VERSION}")),
)
# TODO: introduce some error handling here to detect compilers, etc.

Expand Down

0 comments on commit f2d722f

Please sign in to comment.