Commit b5b589a 1 parent 44b9e76 commit b5b589a Copy full SHA for b5b589a
File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2852,7 +2852,7 @@ const saveCachedNpm = npmCache => {
2852
2852
.catch(err => {
2853
2853
// don't throw an error if cache already exists, which may happen due to
2854
2854
// race conditions
2855
- if (err.message.includes('Cache already exists') ) {
2855
+ if (err instanceof cache.ReserveCacheError ) {
2856
2856
console.warn(err.message)
2857
2857
return -1
2858
2858
}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const saveCachedNpm = npmCache => {
44
44
. catch ( err => {
45
45
// don't throw an error if cache already exists, which may happen due to
46
46
// race conditions
47
- if ( err . message . includes ( 'Cache already exists' ) ) {
47
+ if ( err instanceof cache . ReserveCacheError ) {
48
48
console . warn ( err . message )
49
49
return - 1
50
50
}
You can’t perform that action at this time.
0 commit comments