Skip to content

Commit c2524a0

Browse files
marc-hbcfriedt
authored andcommitted
west: build.py: resolve symlinks in cached source directory check
Fixes the following error: ERROR: Build directory "<whatever>" is for application "<symbolic source dir in CMakeCache.txt>", but source directory "<resolved source dir>" was specified; please clean it, use --pristine, or use --build-dir to set another build directory FATAL ERROR: refusing to proceed without --force due to above error Fixes initial commit ab82264 ("scripts: add west build, flash, and debug commands") Signed-off-by: Marc Herbert <[email protected]>
1 parent 1198087 commit c2524a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/west_commands/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def _sanity_check(self):
368368
# If the build directory specifies a source app, make sure it's
369369
# consistent with --source-dir.
370370
apps_mismatched = (source_abs and cached_abs and
371-
pathlib.PurePath(source_abs) != pathlib.PurePath(cached_abs))
371+
pathlib.Path(source_abs).resolve() != pathlib.Path(cached_abs).resolve())
372372

373373
self.check_force(
374374
not apps_mismatched or self.auto_pristine,

0 commit comments

Comments
 (0)