Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug: can't find targets when it is under blade_root #1036

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading