asdf-yarn
asdf-yarn copied to clipboard
Tidy up the output during installation
Currently, the output of this plugin when installing a version is quite ugly and intimidating.
In this PR, I've made that output much cleaner for humans to read.
Notable Changes
- The
-qflag is now being passed towgetcommands, which are the primary offenders of the bulky output. - The
-qflag is now being passed togpgcommands, particularly the--verifycommand, which prints a spurious warning about the key not being trusted -- we can safely ignore that because we're using a dedicated keyring for this plugin where we've pulled the signing key from a trusted official source via a secure channel. - Output is now consolidated to a single line, whether successful or failed, with a curated error message upon failure and an unambiguous confirmation upon success.
How to verify
# Install this plugin if it's not already installed
$ asdf plugin-add yarn
# Fetch the latest source and check out this PR's branch
$ (cd ~/.asdf/plugins/yarn && git fetch --all && git checkout quiet-gpg-and-wget)
# Install a real version of yarn to confirm it works as expected
$ asdf install yarn 1.22.19
# Install a non-existent version to confirm it fails as expected
$ asdf install yarn 1.3.37
Potential Issues
- If my "prettification" here is too cute or garish, I accept that. I may have gone overboard. If you're on board with the goal of reducing spurious CLI output during install, but think I should rein it in, let me know.
- I'm not sure how well this plugin works on Windows (if at all) and don't intend to test that myself. Any active Windows/WSL users out there, I'd appreciate your help validating these changes or spotting any obvious issues.