Skip to content

Commit

Permalink
throw an error for build paths in HOME (#127)
Browse files Browse the repository at this point in the history
Fixes #126
  • Loading branch information
bcumming authored Aug 24, 2023
1 parent 0de7d22 commit f9b7e46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stackinator/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def __init__(self, args):
if parts[1] == "tmp":
raise IOError("build path can't be in '/tmp'")

# the build path can't be in $HOME because the build step rebinds $HOME
if path.is_relative_to(pathlib.Path.home()):
raise IOError("build path can't be in '$HOME' or '~'")

self.path = path
self.root = pathlib.Path(__file__).parent.resolve()

Expand Down

0 comments on commit f9b7e46

Please sign in to comment.