summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-09-15 00:26:33 -0400
committerJoey Hess <joeyh@joeyh.name>2016-09-15 00:26:41 -0400
commit4fc681f78b2e659d3db3da99fe7c640416fb3b43 (patch)
tree6d20d2864f98d4c3be1814d399bc669524ee6a42 /CmdLine.hs
parentb431fc0fb9d3b4617e4331a549ea02fda236223b (diff)
downloadkeysafe-4fc681f78b2e659d3db3da99fe7c640416fb3b43.tar.gz
Change format of ~/.keysafe/backup.log
Allow deserializing SecretKeySource so we can later know what gpg keys are backed up. Converted KeyId to Text as JSON can't handle ByteString.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index a41a759..686fcb5 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -12,6 +12,7 @@ import Tunables
import qualified Gpg
import Options.Applicative
import qualified Data.ByteString.UTF8 as BU8
+import qualified Data.Text as T
import System.Directory
import Network.Wai.Handler.Warp (Port)
@@ -79,7 +80,7 @@ parse = CmdLine
( long "test"
<> help "Run test suite."
)
- gpgswitch = GpgKey . KeyId . BU8.fromString <$> strOption
+ gpgswitch = GpgKey . KeyId . T.pack <$> strOption
( long "gpgkeyid"
<> metavar "KEYID"
<> help "Specify keyid of gpg key to back up or restore. (When this option is used to back up a key, it must also be used at restore time.)"