diff --git a/pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex b/pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex index ad7f96d6b2a6..5333ad154f5b 100644 --- a/pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex +++ b/pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex @@ -21,11 +21,11 @@ defmodule NixpkgsGitHubUpdate.GitHubLatestVersion do end defp get_token do - String.to_charlist("#{System.get_env("OAUTH_TOKEN")}") + System.get_env("OAUTH_TOKEN") end - defp put_token(headers, token) when is_list(token) do - Map.put_new(headers, 'Authorization', 'token #{token}') + defp put_token(headers, token) when token != nil do + Map.put_new(headers, 'Authorization', 'token #{String.to_charlist(token)}') end defp put_token(headers, _), do: headers