Skip to content

Commit b0ee052

Browse files
authored
Merge pull request easingthemes#122 from easingthemes/bugfix/easingthemes#120-inputs-string-bug
fix: easingthemes#120 check undefined data
2 parents 51b2009 + 2fbb060 commit b0ee052

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/remoteCmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Prom
1616
try {
1717
writeToFile({ dir: githubWorkspace, filename, content });
1818
const dataLimit = 10000;
19-
const rsyncStdout = process.env.RSYNC_STDOUT.substring(0, dataLimit);
19+
const rsyncStdout = (process.env.RSYNC_STDOUT || '').substring(0, dataLimit);
2020
console.log(`Executing remote script: ssh -i ${privateKeyPath} ${sshServer}`);
2121
exec(
2222
`DEBIAN_FRONTEND=noninteractive ssh -p ${(remotePort || 22)} -i ${privateKeyPath} -o StrictHostKeyChecking=no ${sshServer} 'RSYNC_STDOUT="${rsyncStdout}" bash -s' < ${filename}`,
23-
(err, data, stderr) => {
23+
(err, data = '', stderr = '') => {
2424
if (err) {
2525
const message = `⚠️ [CMD] Remote script failed: ${err.message}`;
2626
console.warn(`${message} \n`, data, stderr);

0 commit comments

Comments
 (0)