summary refs log tree commit diff
path: root/pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex')
-rw-r--r--pkgs/desktops/pantheon/nixpkgs_github_update/lib/nixpkgs_github_update/github_latest_version.ex6
1 files changed, 3 insertions, 3 deletions
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 bd4bb8100ba..5333ad154f5 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_binary(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