diff --git a/core/grpc_asset.go b/core/grpc_asset.go index 6051b54..41992ed 100644 --- a/core/grpc_asset.go +++ b/core/grpc_asset.go @@ -180,11 +180,13 @@ func unzip(filename string, perm fs.FileMode, pkg bool) error { } else { if pkg { defer func() { //安装依赖 - cmd := exec.Command(utils.ExecPath+"/language/node/yarn/bin/yarn", "install") - cmd.Dir = utils.ExecPath + "/plugins/" + top + yarn := utils.ExecPath + "/language/node/yarn/bin/yarn" + dir := utils.ExecPath + "/plugins/" + top + cmd := exec.Command(yarn, "install") + cmd.Dir = dir data, err := cmd.Output() if err != nil { - console.Error("依赖添加失败:", err) + console.Error("依赖添加失败:%v %s\n\n你可以尝试自救:\ncd %s\n%s install", err, string(data), dir, yarn) } else { console.Log(string(data)) }