Skip to content

Commit

Permalink
Allow anonymous gists
Browse files Browse the repository at this point in the history
If no token was provided. Useful if you just cloned the repo and tried
to run something.
  • Loading branch information
AlexDaniel committed Feb 1, 2018
1 parent 2c23d3e commit 7c0649d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Whateverable.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ method upload(%files is copy, :$description = ‘’, Bool :$public = True) {

%files = %files.pairs.map: { .key => %( content => .value ) }; # github format

my $gist = Pastebin::Gist.new(token => $CONFIG<github><access_token>);
my $gist = Pastebin::Gist.new(token => $CONFIG<github><access_token> || Nil);
return $gist.paste: %files, desc => $description, public => $public
}

Expand Down

0 comments on commit 7c0649d

Please sign in to comment.