From 304918baded162965c36a544daf277e2f8edbab9 Mon Sep 17 00:00:00 2001 From: Bryan Gardiner Date: Sun, 16 May 2021 18:04:37 -0700 Subject: [PATCH] Fix SIGPIPE handling; bump to v0.1.1. --- CHANGELOG.md | 6 +++++- default.nix | 2 +- src/nvd | 5 ++++- src/nvd.1 | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bac023..25499d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # nvd changelog -## 0.1.0 +## 0.1.1 (2021-05-16) + +- Fix handling of SIGPIPE to exit cleanly. + +## 0.1.0 (2021-05-16) - Add a mandatory action argument to the CLI. The existing diff functionality is under the `diff` command. A new `list` command is now implemented as well diff --git a/default.nix b/default.nix index ff00224..f3497f3 100644 --- a/default.nix +++ b/default.nix @@ -4,7 +4,7 @@ let in stdenv.mkDerivation { pname = "nvd"; - version = "0.1.0"; + version = "0.1.1"; src = nix-gitignore.gitignoreSourcePure [ ./.gitignore ] ./src; diff --git a/src/nvd b/src/nvd index faf075f..4451097 100755 --- a/src/nvd +++ b/src/nvd @@ -45,10 +45,13 @@ import subprocess import sys from collections import namedtuple from pathlib import Path +from signal import SIGPIPE, SIG_DFL, signal from subprocess import PIPE from typing import Dict, List, Optional, Tuple, Union -NVD_VERSION = "0.1.0" +signal(SIGPIPE, SIG_DFL) # Python handles SIGPIPE improperly by default. + +NVD_VERSION = "0.1.1" USE_COLOUR = False diff --git a/src/nvd.1 b/src/nvd.1 index 1b4f7b5..92a7d0d 100644 --- a/src/nvd.1 +++ b/src/nvd.1 @@ -1,4 +1,4 @@ -.TH nvd 1 2021-05-16 nvd-0.1.0 "User Commands" +.TH nvd 1 2021-05-16 nvd-0.1.1 "User Commands" .SH NAME nvd \- Nix/NixOS package version diff tool .SH SYNOPSIS