更新时间:2023-01-08 18:58:10
您不能在单引号或三重单引号中插入变量.使用三重双引号:
You can't interpolate variables in single quotes or triple-single-quotes. Use triple-double-quotes:
stdoutpowershell = powershell returnStdout: true, script: """
write-output "Server is $envserverName"
"""