Skip to content

Commit

Permalink
Don't emit a warning unless a file was actually found
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Mar 22, 2024
1 parent e04dc62 commit 471249e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/importer/filesystem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ class FilesystemImporter extends Importer {
} else if (url.scheme != '') {
return null;
} else if (_loadPath case var loadPath?) {
if (_loadPathDeprecated) {
resolved = resolveImportPath(p.join(loadPath, p.fromUri(url)));

if (resolved != null && _loadPathDeprecated) {
warnForDeprecation(
"Using the current working directory as an implicit load path is "
"deprecated. Either add it as an explicit load path or importer, or "
"load this stylesheet from a different URL.",
Deprecation.fsImporterCwd);
}

resolved = resolveImportPath(p.join(loadPath, p.fromUri(url)));
} else {
return null;
}
Expand Down

0 comments on commit 471249e

Please sign in to comment.