Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix evalbot execution of gists.
Helps to use the correct domain name
  • Loading branch information
thundergnat committed Feb 26, 2015
1 parent e683ad0 commit 620d8ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/EvalbotExecuter.pm
Expand Up @@ -84,7 +84,7 @@ sub run {
if ($program =~ /^https:\/\/gist\.github\.com\/[^\/]+?\/\p{HexDigit}+$/) {
my $page = `curl -s $program`;
$page =~ /<a\b[^>]+?\baria-label="View Raw"[^>]+?\bhref="([^"]+)"/;
if ($1) { $program = decode_utf8 `curl -s https://gist.github.com$1` } else { return 'gist not found' };
if ($1) { $program = decode_utf8 `curl -s https://gist.githubusercontent.com$1` } else { return 'gist not found' };
} elsif ($program =~ /^https:\/\/github\.com\/([^\/]+\/[^\/]+)\/blob\/([^\/]+\/[^\/].*)$/) {
my ($project, $file) = ($1, $2);
my $page = `curl -s $program`;
Expand Down

0 comments on commit 620d8ef

Please sign in to comment.