TsuyoshiUshio / KubernetesTask

Kubernetes Task for Visual Studio Team Services
34 stars 14 forks source link

Adding a feature to check the OSType. #16

Closed TsuyoshiUshio closed 7 years ago

TsuyoshiUshio commented 7 years ago

I add a feature for checking os. It reject only for windows based agent. A lot of people, didn't notice they use Windows Hosted agent. However, it doesn't work for the new download feature.

We have three choice for implementations. One is tl.osType(), Second is the process.env['Agent.OS'], and thrid is os.Type(). We can't use os.Type() some people use windows for developing this task. We need to mock them. that is why I choose tl.osType(). Also, ['Agent.OS'] is set only when it is linux hotesd agent (preview). It is unreliable.