diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-09-01 22:55:46 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-09-01 22:55:46 +0200 |
commit | f16804ac5be71e69b6b33b4d26d2a71d5ae56208 (patch) | |
tree | fed23c5637a06b861b2b7122a030c45de226f20e /etc/bash_completion.d/vyatta-op | |
parent | 96bed7c7b4e856bd34f461b038a724c925bc9dc9 (diff) | |
download | vyatta-op-f16804ac5be71e69b6b33b4d26d2a71d5ae56208.tar.gz vyatta-op-f16804ac5be71e69b6b33b4d26d2a71d5ae56208.zip |
T821: do not allow using the commands pipe if session has uncommited changes.
Diffstat (limited to 'etc/bash_completion.d/vyatta-op')
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 6 |
1 files changed, 5 insertions, 1 deletions
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 |