-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Exercism plugin #404
base: main
Are you sure you want to change the base?
Add Exercism plugin #404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've left a few questions
}, | ||
DefaultProvisioner: provision.TempFile( | ||
tempFileConfig, | ||
provision.AtFixedPath("~/.config/exercism/user.json"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For many tools, the equivalent of ~/.config
from Linux on MacOS is ~/Library/Application Support
.
Is this the case here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually had to find the config file on my Mac since the documentation doesn't give the location, so it is indeed ~/.config
for MacOS.
Name: "Exercism CLI", | ||
Runs: []string{"exercism"}, | ||
DocsURL: sdk.URL("https://exercism.org/docs/using/solving-exercises/working-locally"), | ||
NeedsAuth: needsauth.IfAll( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there may be some other situations as well when we don't want to prompt, for example for a command such as exercism configure --token=<your-api-token>
.
Is --token
a flag available for all the commands? In that case, we may want to exclude this flag from prompting altogether.
Overview
Adds a plugin for the Exercism CLI. A config file at
~/.config/exercism/user.json
is provisioned/imported. This file contains a URL to the Exercism API, an API key, and a directory in which the user's Exercism workspace is located.Type of change
Related Issue(s)
How To Test
Run any exercism command other than help or version.
E.g.,
exercism download --track=cpp --exercise=armstrong-numbers
Changelog
The user can now use the Exercism plugin to authenticate to the Exercism CLI.