From fb1b1d1529e4ff72cc13fe6bb1b3f7c4757434d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E7=9B=B8=E5=85=B5?= Date: Mon, 14 Aug 2023 15:52:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=20Modification=E3=80=91=E4=BF=AE=E6=94=B9=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/scripts/run_main.sh | 7 ++----- install/deb/src/main.go | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/build/scripts/run_main.sh b/build/scripts/run_main.sh index e033c38..315131a 100644 --- a/build/scripts/run_main.sh +++ b/build/scripts/run_main.sh @@ -164,11 +164,8 @@ function install() SRC="${DOCKER_CONFIG_DIR}/daemon.json.${PPID}" DST="${DOCKER_CONFIG_DIR}/daemon.json" - ./ascend-docker-plugin-install-helper add ${DST} ${SRC} ${INSTALL_PATH}/ascend-docker-runtime ${RESERVEDEFAULT} >> ${INSTALL_LOG_PATH} 2>&1 - if [ "$?" != "0" ]; then - echo "[ERROR]: create damon.json failed, you could check ${INSTALL_LOG_PATH} for detail" - exit 1 - fi + # exit when return code is not 0, if use 'set -e' + ./ascend-docker-plugin-install-helper add ${DST} ${SRC} ${INSTALL_PATH}/ascend-docker-runtime ${RESERVEDEFAULT} > /dev/null mv ${SRC} ${DST} chmod 600 ${DST} diff --git a/install/deb/src/main.go b/install/deb/src/main.go index 3464f3a..4958d6e 100644 --- a/install/deb/src/main.go +++ b/install/deb/src/main.go @@ -79,8 +79,8 @@ func main() { if !mindxcheckutils.StringChecker(strings.Join(os.Args, " "), 0, maxCommandLength, mindxcheckutils.DefaultWhiteList+" ") { - hwlog.OpLog.Infof("%v run failed", logPrefixWords) - log.Fatal("command error") + hwlog.OpLog.Errorf("%v check command failed, maybe command contains illegal char", logPrefixWords) + log.Fatalf("command error, please check %s for detail", logPath) } err, behavior := process() -- Gitee