diff --git a/packages/cli/src/bin/decryptKeyPart.ts b/packages/cli/src/bin/decryptKeyPart.ts index 8893eb6..3d6ff03 100644 --- a/packages/cli/src/bin/decryptKeyPart.ts +++ b/packages/cli/src/bin/decryptKeyPart.ts @@ -60,10 +60,15 @@ if (argv[2] === "-h" || argv[2] === "--help") { const { shares } = yaml.load(yamlString) as VoteFileFormat; const ac = new AbortController(); +const gpgParams = (process.env.CARITAT_GPG_PARAMS ?? "").split(/\s/g); const out = await Promise.any( shares.map(async (share) => { - const cp = spawn(env.GPG_BIN || "gpg", ["-d"], { - stdio: ["pipe", "pipe", "inherit"], + const cp = spawn(env.GPG_BIN || "gpg", ["-d", ...gpgParams], { + stdio: [ + "pipe", + "pipe", + process.env.CARITAT_SHOW_ERRORS ? "inherit" : "ignore", + ], signal: ac.signal, }); const stdout = cp.stdout.toArray(); diff --git a/sh/voteUsingGit.sh b/sh/voteUsingGit.sh index 5a6878d..21ac662 100755 --- a/sh/voteUsingGit.sh +++ b/sh/voteUsingGit.sh @@ -32,7 +32,7 @@ $EDITOR "$tmpDir/$path/ballot.yml" # Commit the encrypted JSON vote data. (cd "$tmpDir" && \ git add "$tmpDir/$path/$username.json" && \ - git commit -m "vote from $username") + git commit -n -m "vote from $username") # Pushing to the remote repository. (cd "$tmpDir" && \