mirror of
https://github.com/SamKirkland/FTP-Deploy-Action.git
synced 2026-04-10 12:32:17 +02:00
using act for local debugging
Added act library for local debugging Attempting to use exec argument escaping
This commit is contained in:
17
src/main.ts
17
src/main.ts
@@ -70,11 +70,22 @@ function withDefault(value: string, defaultValue: string) {
|
||||
async function syncFiles(args: IActionArguments) {
|
||||
try {
|
||||
await core.group("Uploading files", async () => {
|
||||
return await exec.exec(`git ftp push --force --auto-init --verbose --syncroot ${args.local_dir} --user ${args.ftp_username} --passwd ${args.ftp_password} ${args.gitFtpArgs} ${args.ftp_server}`);
|
||||
return await exec.exec(
|
||||
"git ftp push",
|
||||
[
|
||||
"--force",
|
||||
"--auto-init",
|
||||
"--verbose",
|
||||
`--syncroot=${args.local_dir}`,
|
||||
`--user=${args.ftp_username}`,
|
||||
`--passwd=${args.ftp_password}`,
|
||||
args.gitFtpArgs!,
|
||||
args.ftp_server!
|
||||
]
|
||||
);
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
console.error("⚠️ Failed to upload files");
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ export enum gitFTPExitCode {
|
||||
ErrorWhileDownloading = 5,
|
||||
UnknownProtocol = 6,
|
||||
RemoteLocked = 7,
|
||||
NotAGitProject = 8,
|
||||
GitRelatedError = 8,
|
||||
PreFTPPushHookFailed = 9,
|
||||
LocalFileOperationFailed = 10
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user