From d8692e787c10d893223c4e4a8778bad9845f13a5 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Mon, 14 Oct 2024 23:08:22 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E5=9B=A0=20subshell?= =?UTF-8?q?=20=E5=AF=BC=E8=87=B4=E5=8F=98=E9=87=8F=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=E8=80=8C=E9=87=8D=E5=A4=8D=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=20virt-what?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trans.sh b/trans.sh index 15331ec..616092e 100644 --- a/trans.sh +++ b/trans.sh @@ -3809,6 +3809,12 @@ install_windows() { mkdir -p "$drv" # 驱动下载临时文件夹 mkdir -p "/wim/drivers" # boot.wim 驱动文件夹 + # 这里有坑 + # $(get_cloud_vendor) 调用了 cache_dmi_and_virt + # 但是 $(get_cloud_vendor) 运行在 subshell 里面 + # subshell 运行结束后里面的变量就消失了 + # 因此先运行 cache_dmi_and_virt + cache_dmi_and_virt vendor="$(get_cloud_vendor)" # virtio