public OperatingSystem getOs() {
    return OperatingSystem.getCurrent();
  }
Returns the current operating system.

@return the current operating system
spock-core/src/main/java/org/spockframework/runtime/extension/builtin/PreconditionContext.java