Skip to content

Commit 84ab716

Browse files
committed
Resolve relative paths to the script
1 parent bc0ebef commit 84ab716

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ const core = require('@actions/core');
33
function run() {
44
try {
55
// This is just a thin wrapper around bash
6-
var child = require('child_process').execFile('./script.sh');
6+
const script = require('path').resolve(__dirname, 'script.sh');
7+
8+
console.log(script);
9+
var child = require('child_process').execFile(script);
710
child.stdout.on('data', function(data) {
811
console.log(data.toString());
912
});

script.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
set -e
44

5-
echo Setting up tmate
5+
echo Setting up tmate...
6+
67
if [ -x "$(command -v brew)" ]; then
78
brew install tmate
89
fi
@@ -14,7 +15,8 @@ fi
1415
[ -e ~/.ssh/id_rsa ] || ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ""
1516

1617

17-
echo Running tmate
18+
echo Running tmate...
19+
1820
tmate -S /tmp/tmate.sock new-session -d
1921
tmate -S /tmp/tmate.sock wait tmate-ready
2022
tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}'

0 commit comments

Comments
 (0)