Skip to content

Commit

Permalink
Merge pull request #17 from sdslabs/h3llix-patch-1
Browse files Browse the repository at this point in the history
Username Failed to parse. Merge patch.
  • Loading branch information
h3llix authored Jan 4, 2022
2 parents af31986 + 8572129 commit f8b5ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/keyhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn get_content_from_github_json(json_text: &str) -> Result<String> {
.ok_or(Error::from(""))
.chain_err(|| "No key 'content' found in JSON recieved from GitHub.")?;
let len = str::len(encoded_content);
let content = base64::decode(&encoded_content[..len-2])
let content = base64::decode(&encoded_content.trim_end())
.chain_err(|| "Bad Base64 Encoding. Probably GitHub is facing some issues. Check https://githubstatus.com.")?;
Ok(String::from_utf8(content).chain_err(|| {
"Bad UTF8 Encoding. Make sure the file you are trying to access is human readable."
Expand Down

0 comments on commit f8b5ed0

Please sign in to comment.