diff --git a/core/dbt/task/clean.py b/core/dbt/task/clean.py index ad4c3d1edaf..513b949ee89 100644 --- a/core/dbt/task/clean.py +++ b/core/dbt/task/clean.py @@ -21,7 +21,7 @@ def __is_protected_path(self, path): abs_path = os.path.abspath(path) protected_paths = self.config.source_paths + \ self.config.test_paths + ['.'] - protected_abs_paths = [os.path.abspath for p in protected_paths] + protected_abs_paths = [os.path.abspath(p) for p in protected_paths] return abs_path in set(protected_abs_paths) or \ self.__is_project_path(abs_path) @@ -35,4 +35,7 @@ def run(self): if not self.__is_protected_path(path): shutil.rmtree(path, True) logger.info(" Cleaned {}/*".format(path)) + else: + logger.info("ERROR: not cleaning {}/* because it is " + "protected".format(path)) logger.info("Finished cleaning all paths.")