Skip to content

Commit fca9b67

Browse files
committed
Add ability to skip the debug command
1 parent 3a5fd05 commit fca9b67

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function run() {
77

88
console.log(script);
99
var child = require('child_process').execFile(script);
10-
child.stdout.on('data', function(data) {
10+
child.stdout.on('data', (data) => {
1111
console.log(data.toString());
1212
});
1313

script.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -e
44

5+
if [[ ! -z "$SKIP_DEBUGGER" ]]; then
6+
echo "Skipping debugger because SKIP_DEBUGGER enviroment variable is set"
7+
exit
8+
fi
9+
510
# Install tmate on macOS or Ubuntu
611
echo Setting up tmate...
712
if [ -x "$(command -v brew)" ]; then
@@ -28,7 +33,7 @@ echo After connecting you can run 'touch /tmp/keepalive' to disable the 15m time
2833

2934
if [[ ! -z "$SLACK_WEBHOOK_URL" ]]; then
3035
MSG=$(tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}')
31-
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$MSG\"}" $SLACK_WEBHOOK_URL
36+
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"\`$MSG\`\"}" $SLACK_WEBHOOK_URL
3237
fi
3338

3439
# Wait for connection to close or timeout in 15 min

0 commit comments

Comments
 (0)