File tree Expand file tree Collapse file tree 1 file changed +22
-44
lines changed Expand file tree Collapse file tree 1 file changed +22
-44
lines changed Original file line number Diff line number Diff line change @@ -1701,27 +1701,28 @@ impl ConfigTree {
1701
1701
ws_settings = ws_settings. or ( Some ( & settings. unscoped ) ) ;
1702
1702
}
1703
1703
if let Some ( ws_settings) = ws_settings {
1704
- if let Some ( config_path) = & ws_settings. config {
1705
- if let Ok ( config_uri) = folder_uri. join ( config_path) {
1706
- if let Ok ( config_file_path) = config_uri. to_file_path ( ) {
1707
- scopes. insert (
1708
- folder_uri. clone ( ) ,
1709
- Arc :: new (
1710
- ConfigData :: load (
1711
- Some ( & config_file_path) ,
1712
- folder_uri,
1713
- settings,
1714
- file_fetcher,
1715
- & cached_fs,
1716
- & deno_json_cache,
1717
- & pkg_json_cache,
1718
- & workspace_cache,
1719
- )
1720
- . await ,
1721
- ) ,
1722
- ) ;
1723
- }
1724
- }
1704
+ let config_file_path = ( || {
1705
+ let config_setting = ws_settings. config . as_ref ( ) ?;
1706
+ let config_uri = folder_uri. join ( config_setting) . ok ( ) ?;
1707
+ specifier_to_file_path ( & config_uri) . ok ( )
1708
+ } ) ( ) ;
1709
+ if config_file_path. is_some ( ) || ws_settings. import_map . is_some ( ) {
1710
+ scopes. insert (
1711
+ folder_uri. clone ( ) ,
1712
+ Arc :: new (
1713
+ ConfigData :: load (
1714
+ config_file_path. as_deref ( ) ,
1715
+ folder_uri,
1716
+ settings,
1717
+ file_fetcher,
1718
+ & cached_fs,
1719
+ & deno_json_cache,
1720
+ & pkg_json_cache,
1721
+ & workspace_cache,
1722
+ )
1723
+ . await ,
1724
+ ) ,
1725
+ ) ;
1725
1726
}
1726
1727
}
1727
1728
}
@@ -1772,29 +1773,6 @@ impl ConfigTree {
1772
1773
}
1773
1774
}
1774
1775
1775
- for folder_uri in settings. by_workspace_folder . keys ( ) {
1776
- if !scopes
1777
- . keys ( )
1778
- . any ( |s| folder_uri. as_str ( ) . starts_with ( s. as_str ( ) ) )
1779
- {
1780
- scopes. insert (
1781
- folder_uri. clone ( ) ,
1782
- Arc :: new (
1783
- ConfigData :: load (
1784
- None ,
1785
- folder_uri,
1786
- settings,
1787
- file_fetcher,
1788
- & cached_fs,
1789
- & deno_json_cache,
1790
- & pkg_json_cache,
1791
- & workspace_cache,
1792
- )
1793
- . await ,
1794
- ) ,
1795
- ) ;
1796
- }
1797
- }
1798
1776
self . scopes = Arc :: new ( scopes) ;
1799
1777
}
1800
1778
You can’t perform that action at this time.
0 commit comments