From 8da59bee3d9157ba30d68d3bf08e022c5458c281 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 12 Dec 2019 12:21:14 +0100 Subject: [PATCH] Fix roclient postinstall script Change-Id: Ib0990d0ad3fb1d11c0337a7837488dd8f5bef3f3 Signed-off-by: garciadeblas --- RO-client/debian/python3-osm-roclient.postinst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RO-client/debian/python3-osm-roclient.postinst b/RO-client/debian/python3-osm-roclient.postinst index 27c90440..1814b31e 100755 --- a/RO-client/debian/python3-osm-roclient.postinst +++ b/RO-client/debian/python3-osm-roclient.postinst @@ -16,7 +16,8 @@ #configure arg-autocomplete for RO-client -su $SUDO_USER -c 'activate-global-python-argcomplete --user' +[ -z "$SUDO_USER" ] && SUDO_USER="$USER" +su $SUDO_USER -c 'activate-global-python-argcomplete3 --user' if ! su $SUDO_USER -c 'grep -q bash_completion.d/python-argcomplete.sh ${HOME}/.bashrc' then echo " inserting .bash_completion.d/python-argcomplete.sh execution at .bashrc" -- 2.17.1