Skip to content

Commit 5c7420e

Browse files
committed
bump to 1.0.6
1 parent fc0a711 commit 5c7420e

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

index.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ import { Argv, Arguments } from "yargs";
33
import * as fs from "fs";
44
import * as openpgp from "openpgp";
55

6-
function readPublicKeys(publicKey: string): openpgp.key.Key[] {
6+
export function readPublicKeys(publicKey: string): openpgp.key.Key[] {
77
const pubkey = fs.readFileSync(publicKey, { encoding: "utf8" });
88
const result = openpgp.key.readArmored(pubkey.trim());
99
if (result.err) {
10-
process.stderr.write(`unable to find key in ${publicKey}\n`);
11-
result.err.forEach(err => console.error(err));
12-
process.exit(1);
10+
throw new Error(result.err.toString());
1311
}
1412
return result.keys;
1513
}
@@ -149,4 +147,4 @@ const argv = yargs
149147
.help()
150148
.recommendCommands()
151149
.demandCommand(1, 'You need to specify a command')
152-
.argv;
150+
.argv;

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tocotrienol",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "a usable command line openpgp program",
55
"main": "index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)