From dcb299e9b91eddec66f5ca1ee6bbede62b9419c1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 18 Jan 2018 22:12:32 +0200 Subject: [PATCH] Use dynamic "build_dir" when checking project for structure chnages --- platformio/commands/run.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platformio/commands/run.py b/platformio/commands/run.py index d459ae6d..02f746cc 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -15,7 +15,7 @@ from datetime import datetime from hashlib import sha1 from os import getcwd, makedirs, walk -from os.path import getmtime, isdir, isfile, join +from os.path import basename, getmtime, isdir, isfile, join from time import time import click @@ -405,12 +405,14 @@ def check_project_envs(config, environments): def calculate_project_hash(): structure = [__version__] + build_dir_name = basename(util.get_projectbuild_dir()) for d in (util.get_projectsrc_dir(), util.get_projectlib_dir()): if not isdir(d): continue for root, _, files in walk(d): for f in files: path = join(root, f) - if not any(s in path for s in (".git", ".svn", ".pioenvs")): + if not any( + s in path for s in (".git", ".svn", build_dir_name)): structure.append(path) return sha1(",".join(sorted(structure))).hexdigest() if structure else ""