Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Ben's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Jul 30, 2024
1 parent fa250dd commit 6ce09b9
Show file tree
Hide file tree
Showing 2 changed files with 335 additions and 294 deletions.
7 changes: 6 additions & 1 deletion lib/src/collect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,15 @@ class StdoutLog extends Log {
extension _ScopedOutput on Set<String> {
bool includesScript(String? scriptUriString) {
if (scriptUriString == null) return false;

// If the set is empty, it means the user didn't specify a --scope-output
// flag, so allow everything.
if (isEmpty) return true;

final scriptUri = Uri.parse(scriptUriString);
if (scriptUri.scheme != 'package') return false;
final scope = scriptUri.path.split('/').first;

final scope = scriptUri.pathSegments.first;
return contains(scope);
}
}
Loading

0 comments on commit 6ce09b9

Please sign in to comment.