using act for local debugging

Added act library for local debugging
Attempting to use exec argument escaping
This commit is contained in:
SamKirkland
2020-05-17 16:57:25 -05:00
parent b698c49eac
commit ae5262e007
6 changed files with 57 additions and 15 deletions

View File

@@ -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);
}
}
}

View File

@@ -25,7 +25,7 @@ export enum gitFTPExitCode {
ErrorWhileDownloading = 5,
UnknownProtocol = 6,
RemoteLocked = 7,
NotAGitProject = 8,
GitRelatedError = 8,
PreFTPPushHookFailed = 9,
LocalFileOperationFailed = 10
}