Skip to content

Commit e845eae

Browse files
author
Lucas Killgore
committed
#959233: SSH: add inline script support: fixes
1 parent e33fd06 commit e845eae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tasks/SSH/ssh.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ async function run() {
5959
var inlineScript: string = tl.getInput('inline', true);
6060
const scriptHeader:string = '#!';
6161
if (inlineScript && !inlineScript.startsWith(scriptHeader)) {
62-
inlineScript = '#!/bin/bash' + os.EOL + inlineScript;
62+
const bashHeader: string = '#!/bin/bash';
63+
tl.debug('No script header detected. Adding: ' + bashHeader);
64+
inlineScript = bashHeader + os.EOL + inlineScript;
6365
}
6466
scriptFile = path.join(os.tmpdir(), 'sshscript_' + new Date().getTime()); // default name
6567
try {

0 commit comments

Comments
 (0)