
[why] when execute 3-code/dev-env in openeuler and centos machine, error message as follows: ./dev-env: line 45: ./os/openEuler: No such file or directory the purpose of ". $(dirname ${BASH_SOURCE[0]})/os/${ID}" is to fix crystal-shards build error when adapt in debian. but it's unnecessary for other linux os. Please see: [PATCH compass-ci 3/4] sparrow: add domain name resolution for Docker images [how] add judge to avoid redundant error message. Signed-off-by: Liu Yinsi <liuyinsi@163.com> --- sparrow/3-code/dev-env | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sparrow/3-code/dev-env b/sparrow/3-code/dev-env index 8928816..218b6c1 100755 --- a/sparrow/3-code/dev-env +++ b/sparrow/3-code/dev-env @@ -44,4 +44,6 @@ EOF source /etc/os-release -. $(dirname ${BASH_SOURCE[0]})/os/${ID} +path=$(dirname ${BASH_SOURCE[0]})/os/${ID} +[ -x "$path" ] || exit 0 +. "$path" -- 2.23.0