Skip to content

Commit

Permalink
Fix bug: can't find targets when it is under blade_root
Browse files Browse the repository at this point in the history
  • Loading branch information
chen3feng committed Mar 31, 2024
1 parent 77bbb05 commit 50dc660
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/blade/load_build_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,17 @@ def under_excluded_trees(source_dir):

for target_id in target_ids:
source_dir, target_name = target_id.rsplit(':', 1)
if source_dir and not os.path.exists(source_dir):

if source_dir == '':
source_dir = '.'
elif not os.path.exists(source_dir):
_report_not_exist('Directory', source_dir, source_dir, blade)

skip_file = _check_under_skipped_dir(source_dir)
if skip_file:
console.warning('"%s" is under skipped directory due to "%s", ignored' % (target_id, skip_file))
continue

if target_name == '...':
for root, dirs, files in os.walk(source_dir):
# Note the dirs[:] = slice assignment; we are replacing the
Expand Down

0 comments on commit 50dc660

Please sign in to comment.