Skip to content

Commit 0781355

Browse files
authored
Upgrade @actions/cache to 1.0.4 (#451)
1 parent 22c64ac commit 0781355

5 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎.licenses/npm/@actions/cache.dep.yml‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/restore/index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3267,9 +3267,12 @@ function uploadChunk(httpClient, resourceUrl, openStream, start, end) {
32673267
'Content-Type': 'application/octet-stream',
32683268
'Content-Range': getContentRange(start, end)
32693269
};
3270-
yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {
3270+
const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {
32713271
return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders);
32723272
}));
3273+
if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) {
3274+
throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`);
3275+
}
32733276
});
32743277
}
32753278
function uploadFile(httpClient, cacheId, archivePath, options) {

‎dist/save/index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3267,9 +3267,12 @@ function uploadChunk(httpClient, resourceUrl, openStream, start, end) {
32673267
'Content-Type': 'application/octet-stream',
32683268
'Content-Range': getContentRange(start, end)
32693269
};
3270-
yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {
3270+
const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {
32713271
return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders);
32723272
}));
3273+
if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) {
3274+
throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`);
3275+
}
32733276
});
32743277
}
32753278
function uploadFile(httpClient, cacheId, archivePath, options) {

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"author": "GitHub",
2424
"license": "MIT",
2525
"dependencies": {
26-
"@actions/cache": "^1.0.3",
26+
"@actions/cache": "^1.0.4",
2727
"@actions/core": "^1.2.6",
2828
"@actions/exec": "^1.0.1",
2929
"@actions/io": "^1.0.1"

0 commit comments

Comments
 (0)