Skip to content

Commit

Permalink
bump to 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanwh committed May 2, 2018
1 parent fc0a711 commit 5c7420e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { Argv, Arguments } from "yargs";
import * as fs from "fs";
import * as openpgp from "openpgp";

function readPublicKeys(publicKey: string): openpgp.key.Key[] {
export function readPublicKeys(publicKey: string): openpgp.key.Key[] {
const pubkey = fs.readFileSync(publicKey, { encoding: "utf8" });
const result = openpgp.key.readArmored(pubkey.trim());
if (result.err) {
process.stderr.write(`unable to find key in ${publicKey}\n`);
result.err.forEach(err => console.error(err));
process.exit(1);
throw new Error(result.err.toString());
}
return result.keys;
}
Expand Down Expand Up @@ -149,4 +147,4 @@ const argv = yargs
.help()
.recommendCommands()
.demandCommand(1, 'You need to specify a command')
.argv;
.argv;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tocotrienol",
"version": "1.0.5",
"version": "1.0.6",
"description": "a usable command line openpgp program",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 5c7420e

Please sign in to comment.