From f16804ac5be71e69b6b33b4d26d2a71d5ae56208 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sat, 1 Sep 2018 22:55:46 +0200 Subject: T821: do not allow using the commands pipe if session has uncommited changes. --- etc/bash_completion.d/vyatta-op | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index d917806..1188a30 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -500,7 +500,11 @@ strip-private () commands () { if [ "$_OFR_CONFIGURE" != "" ]; then - ${vyos_libexec_dir}/commands-pipe.py + if $(cli-shell-api sessionChanged); then + echo "You have uncommited changes, please commit them before using the commands pipe" + else + ${vyos_libexec_dir}/commands-pipe.py + fi else echo "commands pipe is not supported in operational mode" fi -- cgit v1.2.3