Skip to content

feat: clear ftp-deploy-sync-state.json on FTPError: 550 #511

@rbalet

Description

@rbalet

Description
When the tool is trying to delete a file that does not exists on the server, we get the following error in the CI.

FTPError: 550 /my-folder/my-file: No such file or directory
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5263:39)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5107:44)
    at Socket.emit (node:events:524:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:191:23) {
  code: 550
}

Proposition
When the file are not found, remove his content from the .ftp-deploy-sync-state.json file.

Then, it could :

  1. Crache like it did : Faster to implement, user will have to rerun the ci (which he will either way)
  2. Continue silently. : _Cleaner IMO, just add a warning that this have been done with a massage that explain that following file have been removed on the server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions