mirror of
https://github.com/kennethreitz/bob-builder-1.git
synced 2026-06-05 23:10:17 +00:00
Clear build_dir before build
Intentionally uses os.path.exists without checking if it's a dir so that if it's a file or link an error is raised and the user sees that they're doing something really wrong somehow, somewhere
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import os
|
||||
import envoy
|
||||
import shutil
|
||||
import sys
|
||||
from tempfile import mkstemp, mkdtemp
|
||||
|
||||
@@ -110,6 +111,8 @@ class Formula(object):
|
||||
|
||||
def build(self):
|
||||
# Prepare build directory.
|
||||
if os.path.exists(self.build_path):
|
||||
shutil.rmtree(self.build_path)
|
||||
mkdir_p(self.build_path)
|
||||
|
||||
self.resolve_deps()
|
||||
|
||||
Reference in New Issue
Block a user