据我所知,詹金斯只区分Windows和Unix,即如果在Windows上使用bat,在Unix / mac /
linux上使用sh。因此,您可以在此处使用
isUnix()(更多信息)来确定您使用的是Unix还是Windows,对于unix,请使用sh和@Spencer
Malone的答案来支持有关该系统的更多信息(如果需要)。

据我所知,詹金斯只区分Windows和Unix,即如果在Windows上使用bat,在Unix / mac /
linux上使用sh。因此,您可以在此处使用
isUnix()(更多信息)来确定您使用的是Unix还是Windows,对于unix,请使用sh和@Spencer