summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cacache/lib/content/read.js
diff options
context:
space:
mode:
authornpm CLI robot <npm-cli+bot@github.com>2022-06-24 18:21:50 -0700
committerGitHub <noreply@github.com>2022-06-25 02:21:50 +0100
commit687e50aded0d264873911847717e7567382b1401 (patch)
treeb7f38b32e988bf3f7a9567dc3cd1c62e0be1c43f /deps/npm/node_modules/cacache/lib/content/read.js
parent3507b3f9a9da6c451c18f303d3b96e4deedf2f5b (diff)
downloadnode-new-687e50aded0d264873911847717e7567382b1401.tar.gz
deps: upgrade npm to 8.13.1
PR-URL: https://github.com/nodejs/node/pull/43552 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/cacache/lib/content/read.js')
-rw-r--r--deps/npm/node_modules/cacache/lib/content/read.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/deps/npm/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/cacache/lib/content/read.js
index f5128fe185..8367ccb205 100644
--- a/deps/npm/node_modules/cacache/lib/content/read.js
+++ b/deps/npm/node_modules/cacache/lib/content/read.js
@@ -13,7 +13,7 @@ async function read (cache, integrity, opts = {}) {
const { size } = opts
const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
// get size
- const stat = await fs.lstat(cpath)
+ const stat = await fs.stat(cpath)
return { stat, cpath, sri }
})
if (typeof size === 'number' && stat.size !== size) {
@@ -73,8 +73,8 @@ function readStream (cache, integrity, opts = {}) {
// Set all this up to run on the stream and then just return the stream
Promise.resolve().then(async () => {
const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
- // just lstat to ensure it exists
- const stat = await fs.lstat(cpath)
+ // just stat to ensure it exists
+ const stat = await fs.stat(cpath)
return { stat, cpath, sri }
})
if (typeof size === 'number' && size !== stat.size) {
@@ -111,7 +111,7 @@ async function hasContent (cache, integrity) {
try {
return await withContentSri(cache, integrity, async (cpath, sri) => {
- const stat = await fs.lstat(cpath)
+ const stat = await fs.stat(cpath)
return { size: stat.size, sri, stat }
})
} catch (err) {
@@ -139,7 +139,7 @@ function hasContentSync (cache, integrity) {
return withContentSriSync(cache, integrity, (cpath, sri) => {
try {
- const stat = fs.lstatSync(cpath)
+ const stat = fs.statSync(cpath)
return { size: stat.size, sri, stat }
} catch (err) {
if (err.code === 'ENOENT') {