-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd: Support optional use of GitHub personal access tokens
With a personal access token, the API rate limit is increased from 60 requests per hour to 5000 requests per hour.
- Loading branch information
Showing
10 changed files
with
103 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# User cache and config dirs (we use os.UserCacheDir and os.UserCongfigDir) | ||
[darwin] env HOME=home | ||
[darwin] mkdir "$HOME/Library/Caches" | ||
[darwin] mkdir "$HOME/Library/Application Support" | ||
[linux] env XDG_CACHE_HOME=cache | ||
[linux] env XDG_CONFIG_HOME=config | ||
[windows] env LocalAppData=cache | ||
[windows] env AppData=config | ||
|
||
# Test | ||
! exec hvm config | ||
stderr 'Error: configuration: numTagsToDisplay must be a non-zero integer' | ||
|
||
# Files for darwin | ||
-- home/Library/Application Support/hvm/config.toml -- | ||
numtagstodisplay = "x" | ||
|
||
# Files for linux and windows | ||
-- config/hvm/config.toml -- | ||
numtagstodisplay = "x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# User cache and config dirs (we use os.UserCacheDir and os.UserCongfigDir) | ||
[darwin] env HOME=home | ||
[darwin] mkdir "$HOME/Library/Caches" | ||
[darwin] mkdir "$HOME/Library/Application Support" | ||
[linux] env XDG_CACHE_HOME=cache | ||
[linux] env XDG_CONFIG_HOME=config | ||
[windows] env LocalAppData=cache | ||
[windows] env AppData=config | ||
|
||
env HVM_NUMTAGSTODISPLAY=42 | ||
env HVM_GITHUBTOKEN=my-token | ||
|
||
# Test | ||
exec hvm config | ||
stdout '# GitHub personal access token\n' | ||
stdout 'githubToken = ''my-token''\n' | ||
stdout '# Number of tags to display with the "use" and "install" commands\n' | ||
stdout 'numTagsToDisplay = 42\n' | ||
stdout 'Configuration file: ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
[darwin] skip | ||
[windows] skip | ||
|
||
|
||
# Test | ||
stdin input.txt | ||
exec hvm reset | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters