diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index 30b974e105733..211c41c05a851 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 960c777bbc4aed25629fa86a8d7bf10b +Signature: fd17294a410a1a503ab9aa72a0797dbe diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index 8ce7366dab5c6..bfc80a5d0047a 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -106,7 +106,7 @@ class _RepositorySourceFile extends _RepositoryLicensedFile { } } _licenses!.sort(); - for (final License license in licenses) { + for (final License license in _licenses!) { license.markUsed(io.fullName, libraryName); } assert(_licenses != null && _licenses!.isNotEmpty); @@ -126,7 +126,7 @@ class _RepositoryBinaryFile extends _RepositoryLicensedFile { if (_licenses == null || _licenses!.isEmpty) { throw 'no license file found in scope for ${io.fullName}'; } - for (final License license in licenses!) { + for (final License license in _licenses!) { license.markUsed(io.fullName, libraryName); } }