Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 7b61fe7

Browse files
authored
Merge pull request #223 from secrethub/feature/postinst-silent-fail
Silently fail if pkg-config does not exist
2 parents 54eb3e4 + fbec89f commit 7b61fe7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/post-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
CONF_DIR=$(pkg-config --variable=completionsdir bash-completion)
3+
CONF_DIR=$(pkg-config --variable=completionsdir bash-completion 2> /dev/null) || true
44
if [ "${CONF_DIR}" != "" ]; then
55
BASH_COMPLETION_DIR=$CONF_DIR
66
elif [ -d /usr/share/bash-completion/completions/ ]; then

scripts/post-remove.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Only execute if this is an uninstall, not an upgrade.
44
if [ "$1" = "0" ]; then
5-
CONF_DIR=$(pkg-config --variable=completionsdir bash-completion)
5+
CONF_DIR=$(pkg-config --variable=completionsdir bash-completion 2> /dev/null) || true
66
if [ "${CONF_DIR}" != "" ]; then
77
BASH_COMPLETION_DIR=$CONF_DIR
88
elif [ -d /usr/share/bash-completion/completions/ ]; then

0 commit comments

Comments
 (0)