diff options
author | Luca Casonato <hello@lcas.dev> | 2023-08-08 16:28:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-08 16:28:18 -0400 |
commit | 03e963f57831367a39996c7d88bc9875e97d52d7 (patch) | |
tree | 8920cda4906ad9300550679d2492f0023d0beabc /cli/npm/cache.rs | |
parent | f2e30a6f7999fa6ce4ab789266927e3abbb48e3f (diff) |
chore: rename some helpers on the Fs trait (#20097)
Rename some of the helper methods on the Fs trait to be suffixed with
`_sync` / `_async`, in preparation of the introduction of more async
methods for some helpers.
Also adds a `read_text_file_async` helper to complement the renamed
`read_text_file_sync` helper.
Diffstat (limited to 'cli/npm/cache.rs')
-rw-r--r-- | cli/npm/cache.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index 32989c6a7..c657beef3 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -344,10 +344,10 @@ impl NpmCache { .cache_dir .package_folder_for_name_and_version(package, registry_url); if self.should_use_global_cache_for_package(package) - && self.fs.exists(&package_folder) + && self.fs.exists_sync(&package_folder) // if this file exists, then the package didn't successfully extract // the first time, or another process is currently extracting the zip file - && !self.fs.exists(&package_folder.join(NPM_PACKAGE_SYNC_LOCK_FILENAME)) + && !self.fs.exists_sync(&package_folder.join(NPM_PACKAGE_SYNC_LOCK_FILENAME)) { return Ok(()); } else if self.cache_setting == CacheSetting::Only { |