From 50e2cefbcc08224ee4b97552b7f83314e6584ef1 Mon Sep 17 00:00:00 2001 From: Sam Kirkland Date: Tue, 26 Aug 2025 00:29:03 -0500 Subject: [PATCH] v4.3.6 --- dist/index.js | 14 ++++++++++++-- package-lock.json | 9 +++++---- package.json | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dist/index.js b/dist/index.js index fa7c245..b6ee571 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3626,7 +3626,7 @@ class FTPSyncProvider { } catch (e) { // this error is common when a file was deleted on the server directly - if (e.code === types_1.ErrorCode.FileNotFoundOrNoAccess) { + if ((e === null || e === void 0 ? void 0 : e.code) === types_1.ErrorCode.FileNotFoundOrNoAccess) { this.logger.standard("File not found or you don't have access to the file - skipping..."); } else { @@ -3643,7 +3643,17 @@ class FTPSyncProvider { const absoluteFolderPath = "/" + (this.serverPath.startsWith("./") ? this.serverPath.replace("./", "") : this.serverPath) + folderPath; this.logger.all(`removing folder "${absoluteFolderPath}"`); if (this.dryRun === false) { - yield (0, utilities_1.retryRequest)(this.logger, () => __awaiter(this, void 0, void 0, function* () { return yield this.client.removeDir(absoluteFolderPath); })); + try { + yield (0, utilities_1.retryRequest)(this.logger, () => __awaiter(this, void 0, void 0, function* () { return yield this.client.removeDir(absoluteFolderPath); })); + } + catch (e) { + if ((e === null || e === void 0 ? void 0 : e.code) === types_1.ErrorCode.FileNotFoundOrNoAccess) { + this.logger.standard("Directory not found or you don't have access to the file - skipping..."); + } + else { + throw e; + } + } } this.logger.verbose(` completed`); }); diff --git a/package-lock.json b/package-lock.json index 7ed8671..749a690 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.9.1", - "@samkirkland/ftp-deploy": "^1.2.4", + "@samkirkland/ftp-deploy": "^1.2.5", "@types/jest": "^29.4.1", "jest": "^29.5.0", "ts-jest": "^29.0.5", @@ -1097,9 +1097,10 @@ } }, "node_modules/@samkirkland/ftp-deploy": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-1.2.4.tgz", - "integrity": "sha512-MF5BoP1mQS3HBdx2pTMX/sIxSt9S4IgdL6ttrcGpUWC9U/IIPcUnyVEQiiBQJePLXpHI93dT9b8VDoS+cUknNg==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@samkirkland/ftp-deploy/-/ftp-deploy-1.2.5.tgz", + "integrity": "sha512-UZJKpb46FOGLmjgLiQDmzU/3zZUP1ckCaJG6xaHQ1igAGydLm6ctYmQO9gupJYs3HzEYkLXzU5AZGOb4RuHTjw==", + "license": "MIT", "dependencies": { "basic-ftp": "^5.0.5", "lodash": "^4.17.21", diff --git a/package.json b/package.json index fd9f1d1..de5c453 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.9.1", - "@samkirkland/ftp-deploy": "^1.2.4", + "@samkirkland/ftp-deploy": "^1.2.5", "@types/jest": "^29.4.1", "jest": "^29.5.0", "ts-jest": "^29.0.5",