From 01f43866c74dc8bd4446b750c886ba56dac55400 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Fri, 24 Feb 2023 00:01:20 +0800 Subject: [PATCH] opt some --- core/code/sh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/code/sh.go b/core/code/sh.go index 0fb77378..8473fb3e 100644 --- a/core/code/sh.go +++ b/core/code/sh.go @@ -13,7 +13,8 @@ import ( func _sh_exec(m *ice.Message, arg ...string) { m.Cmdy(cli.SYSTEM, SH, "-c", kit.Format(_sh_template, m.Option(ice.MSG_USERHOST), m.Option(ice.MSG_USERPOD), path.Join(arg[2], arg[1]))) - m.StatusTime("script", kit.Renders(kit.Format(`export ctx_dev={{.Option "user.host"}}; temp=$(mktemp); wget -O $temp -q $ctx_dev; source $temp %s`, path.Join(arg[2], arg[1])), m)) + m.StatusTime("script", kit.Renders(kit.Format(`export ctx_dev={{.Option "user.host"}}%s; temp=$(mktemp); wget -O $temp -q $ctx_dev; source $temp %s`, + kit.Select("", " ctx_pod="+m.Option(ice.MSG_USERPOD), m.Option(ice.MSG_USERPOD) != ""), path.Join(arg[2], arg[1])), m)) } const SH = nfs.SH