We should check if we're on windows platform or not using:

Chef::Platform.windows?