main: Also support CLI extensions in /usr/libexec/libostree/ext
In fixing https://github.com/coreos/rpm-ostree/pull/3323 I felt that it was a bit ugly we're installing `/usr/bin/ostree-container`. It's kind of an implementation detail. We want users to use `ostree container`. Let's support values outside of $PATH too. For example, this also ensures that TAB completion for `ost` expands to `ostree ` with a space.
This commit is contained in:
1 parent
7cc8481907
commit
998154f8ff
5 files changed
+45
-2
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Random misc tests
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
. ${KOLA_EXT_DATA}/libinsttest.sh
|
||||
|
||||
echo "1..1"
|
||||
date
|
||||
|
||||
# Test CLI extensions installed alongside the system
|
||||
extdir=/usr/libexec/libostree/ext/
|
||||
mkdir -p "${extdir}"
|
||||
ln -sr /usr/bin/env ${extdir}/ostree-env
|
||||
|
||||
env TESTENV=foo ostree env > out.txt
|
||||
assert_file_has_content out.text TESTENV=foo
|
||||
rm -vf "${extdir}/ostree-env"
|
||||
echo "ok env"
|
||||
|
||||
# End test
|
||||
date
|
||||
@@ -9,6 +9,9 @@ set -euo pipefail
|
||||
|
||||
echo '1..2'
|
||||
|
||||
# Test CLI extensions via $PATH. If you change this, you may
|
||||
# also want to change the corresponding destructive version in
|
||||
# tests/kolainst/destructive/basic-misc.sh
|
||||
mkdir -p ./localbin
|
||||
ORIG_PATH="${PATH}"
|
||||
export PATH="./localbin/:${PATH}"
|
||||
|
||||
Reference in new issue
Block a user