From ad869f9df65cb8972a555b954fc9dd4561667994 Mon Sep 17 00:00:00 2001 From: Samantha Marshall Date: Mon, 13 Mar 2017 13:38:32 -0400 Subject: [PATCH] fixing typo and adding message for retrieving API Token from file --- src/nimblepkg/publish.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nimblepkg/publish.nim b/src/nimblepkg/publish.nim index 9b24518..6dd2378 100644 --- a/src/nimblepkg/publish.nim +++ b/src/nimblepkg/publish.nim @@ -52,12 +52,15 @@ proc getGithubAuth(cfg: Config): Auth = if existsEnv(ApiTokenEnvironmentVariable): result.token = getEnv(ApiTokenEnvironmentVariable) display("Info:", "Using the '" & ApiTokenEnvironmentVariable & - "' environment varaible for the GitHub API Token.", + "' environment variable for the GitHub API Token.", priority = HighPriority) else: # try to read from disk, if it cannot be found write a new one try: - result.token = readFile(cfg.nimbleDir / ApiKeyFile) + let api_token_file_path = cfg.nimbleDir / ApiKeyFile + result.token = readFile(api_token_file_path) + display("Info:", "Using GitHub API Token in file: " & api_token_file_path, + priority = HighPriority) except IOError: result.token = requestNewToken(cfg)