Skip to content

Commit

Permalink
Merge pull request #36 from pascal-zarrad/feature/wsl-gpg
Browse files Browse the repository at this point in the history
Add a gpg fix for WSL users
  • Loading branch information
pascal-zarrad authored Feb 19, 2020
2 parents 2c8ad40 + b94e6a4 commit d10ee2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ What is the expected behavior that is expected by the changes of the PR?
- The installer does now x/y...

### Additional information
Add here additional information if applicable or remove this section-
Add here additional information if applicable or remove this section.

#### Checklist
Use the following checklist to ensure your PR meets all contribution requirements.
Expand Down
18 changes: 18 additions & 0 deletions plugins/wsl-gpg/plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

#==================================================================
# Script Name : wsl-gpg
# Description : Plugin that puts a export into the .zshrc to use
# the terminal for the gpg password prompt on wsl.
# Args : -
# Author : Pascal Zarrad
# Email : [email protected]
#==================================================================

# This fix is only for WSL where gpg is unable to find a spot to prompt for
# the password, so we add a environment variable to fix that.
if grep -q "Microsoft" "/proc/version" || grep -q ".*microsoft-standard*." "/proc/version"
then
write_zshrc "export GPG_TTY=$(tty)"
echo "Applied wsl-gpg fix to support gpg on wsl!"
fi

0 comments on commit d10ee2f

Please sign in to comment.