mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-04-28 00:37:18 +08:00
change RSYNC_STDOUT to string
This commit is contained in:
parent
4e7456f7be
commit
177f5b4b79
13
.github/workflows/e2e.yml
vendored
13
.github/workflows/e2e.yml
vendored
@ -64,9 +64,10 @@ jobs:
|
||||
SOURCE: "test_project/"
|
||||
TARGET: "/var/www/html/"
|
||||
EXCLUDE: "/dist/, /node_modules/"
|
||||
# SCRIPT_BEFORE: |
|
||||
# whoami
|
||||
# ls -al
|
||||
# SCRIPT_AFTER: |
|
||||
# whoami
|
||||
# ls -al
|
||||
SCRIPT_BEFORE: |
|
||||
whoami
|
||||
ls -al
|
||||
SCRIPT_AFTER: |
|
||||
whoami
|
||||
ls -al
|
||||
echo $RSYNC_STDOUT
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -17,7 +17,7 @@ const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Prom
|
||||
writeToFile({ dir: githubWorkspace, filename, content });
|
||||
console.log(`Executing remote script: ssh -i ${privateKeyPath} ${sshServer}`, content);
|
||||
exec(
|
||||
`DEBIAN_FRONTEND=noninteractive ssh -i ${privateKeyPath} ${sshServer} 'RSYNC_STDOUT=${process.env.RSYNC_STDOUT} bash -s' < ${filename}`,
|
||||
`DEBIAN_FRONTEND=noninteractive ssh -i ${privateKeyPath} ${sshServer} 'RSYNC_STDOUT="${process.env.RSYNC_STDOUT}" bash -s' < ${filename}`,
|
||||
(err, data, stderr) => {
|
||||
if (err) {
|
||||
const message = `⚠️ [CMD] Remote script failed: ${err.message}`;
|
||||
|
@ -67,7 +67,7 @@ const sshDeploy = async (params) => {
|
||||
await validateRsync();
|
||||
const stdout = await rsyncCli(params);
|
||||
console.log('✅ [Rsync] finished.', stdout);
|
||||
process.env.RSYNC_STDOUT = stdout;
|
||||
process.env.RSYNC_STDOUT = `${stdout}`;
|
||||
return stdout;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user