Skip to content

Commit 4022b0d

Browse files
committed
InABox: post a snippet with command output on failure
1 parent 6477c8a commit 4022b0d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/Synergy/Reactor/InABox.pm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,19 @@ async sub _setup_droplet ($self, $event, $droplet, $key_file, $args = []) {
423423
return await $event->reply("In-a-Box ($droplet->{name}) is now set up!");
424424
}
425425

426+
if ($event->from_channel->isa('Synergy::Channel::Slack')) {
427+
return await $event->from_channel->slack->api_call(
428+
'files.upload',
429+
{
430+
form_encoded => 1, # Sigh.
431+
432+
content => $stderr,
433+
channels => $event->conversation_address,
434+
initial_comment => "Something went wrong setting up your box:",
435+
},
436+
);
437+
}
438+
426439
return await $event->reply("Something went wrong setting up your box, sorry!");
427440
}
428441

0 commit comments

Comments
 (0)