Skip to content

Commit ebc9440

Browse files
Improving warning message when ApiTokens.psm1 does not exist
1 parent 7be9ef8 commit ebc9440

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

GitHubAnalytics.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ if (Test-Path $apiTokensFilePath)
1111
}
1212
else
1313
{
14-
Write-Host "$apiTokensFilePath does not exist, skipping import"
15-
Write-Host @'
14+
Write-Warning "$apiTokensFilePath does not exist, skipping import"
15+
Write-Warning @'
1616
This module should define $global:gitHubApiToken with your GitHub API access token in ApiTokens.psm1. Create this file if it doesn't exist.
17-
You can simply rename ApiTokensTemplate.psm1 to ApiTokens.psm1 and update value of $global:gitHubApiToken.
17+
You can simply rename ApiTokensTemplate.psm1 to ApiTokens.psm1 and update value of $global:gitHubApiToken, then reimport this module with -Force switch.
1818
You can get GitHub token from https://github.com/settings/tokens
1919
If you don't provide it, you can still use this module, but you will be limited to 60 queries per hour.
2020
'@

GitHubLabels.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ if (Test-Path $apiTokensFilePath)
1111
}
1212
else
1313
{
14-
Write-Host "$apiTokensFilePath does not exist, skipping import"
15-
Write-Host @'
14+
Write-Warning "$apiTokensFilePath does not exist, skipping import"
15+
Write-Warning @'
1616
This module should define $global:gitHubApiToken with your GitHub API access token in ApiTokens.psm1. Create this file if it doesn't exist.
17-
You can simply rename ApiTokensTemplate.psm1 to ApiTokens.psm1 and update value of $global:gitHubApiToken.
17+
You can simply rename ApiTokensTemplate.psm1 to ApiTokens.psm1 and update value of $global:gitHubApiToken, then reimport this module with -Force switch.
1818
You can get GitHub token from https://github.com/settings/tokens
1919
If you don't provide it, you can still use this module, but you will be limited to 60 queries per hour.
2020
'@

0 commit comments

Comments
 (0)