From d72f1bb30a1a520773e25ba4f6903ef75003c27e Mon Sep 17 00:00:00 2001 From: NiuTao Date: Thu, 25 Apr 2024 23:58:26 +0800 Subject: [PATCH] fix: fix vscode install error --- config/rpm.list | 4 +--- scripts/install_devkit.sh | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/rpm.list b/config/rpm.list index f8d5af5..0091424 100644 --- a/config/rpm.list +++ b/config/rpm.list @@ -295,6 +295,4 @@ tcpdump fio ipmitool libaio-devel -numactl-devel -ffmpeg -ffmpeg-devel \ No newline at end of file +numactl-devel \ No newline at end of file diff --git a/scripts/install_devkit.sh b/scripts/install_devkit.sh index a3e553a..ec41a4a 100644 --- a/scripts/install_devkit.sh +++ b/scripts/install_devkit.sh @@ -37,7 +37,9 @@ function install_plugins() if [[ -f "${file}" ]]; then cp "${file}" "${ROOTFS}/${plugin}" display_alert "Installing " "${plugin}" "info" - chroot --userspec=0:0 "${ROOTFS}" /bin/bash -c "code --no-sandbox --user-data-dir ~ --install-extension ${plugin}" + mount_chroot ${ROOTFS} + run_on_rootfs "code --no-sandbox --user-data-dir /home/${execute_user} --install-extension ${plugin}" + umount_chroot ${ROOTFS} rm ${ROOTFS}/${plugin} else display_alert "Install failed " "${plugin}" "error" @@ -77,7 +79,7 @@ function install_kit() cp -f ${SRC}/scripts/devkit/deploy_devkit.sh ${ROOTFS}/tmp/deploy_devkit.sh mount_chroot ${ROOTFS} - chroot --userspec=0:0 "expect /tmp/deploy_devkit.sh /tmp/DevKit-All-24.0.T10-Linux-Kunpeng" + run_on_rootfs "expect /tmp/deploy_devkit.sh /tmp/DevKit-All-24.0.T10-Linux-Kunpeng" umount_chroot ${ROOTFS} rm -rf ${ROOTFS}/tmp/DevKit-All-24.0.T10-Linux-Kunpeng -- Gitee