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 ""