gl-vsts-tasks-file-patch icon indicating copy to clipboard operation
gl-vsts-tasks-file-patch copied to clipboard

Don't start JSON patch on macos agent

Open djonik1562 opened this issue 4 years ago • 0 comments

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • [x] Bug
  • [ ] Feature request

Description

I get error "The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell." when start job on macos hosted agent.

Expected behavior

Patched json file

Reproduction

Install task from marketplace, add to build definition task Patch JSON files, and run build on macos build agent.

2020-10-22T15:22:47.1521160Z ##[debug]Evaluating condition for step: 'Patch files AppSettings.json'
2020-10-22T15:22:47.1636880Z ##[debug]Evaluating: and(succeeded(), in(variables['ForServiceDirect'], 'True', 'true', '1'))
2020-10-22T15:22:47.1723760Z ##[debug]Evaluating and:
2020-10-22T15:22:47.1823440Z ##[debug]..Evaluating succeeded:
2020-10-22T15:22:47.1925790Z ##[debug]..=> True
2020-10-22T15:22:47.2006800Z ##[debug]..Evaluating in:
2020-10-22T15:22:47.2110780Z ##[debug]....Evaluating indexer:
2020-10-22T15:22:47.2320770Z ##[debug]......Evaluating variables:
2020-10-22T15:22:47.2417040Z ##[debug]......=> Object
2020-10-22T15:22:47.2500890Z ##[debug]......Evaluating String:
2020-10-22T15:22:47.2613550Z ##[debug]......=> 'ForServiceDirect'
2020-10-22T15:22:47.2791790Z ##[debug]....=> 'true'
2020-10-22T15:22:47.2904700Z ##[debug]....Evaluating String:
2020-10-22T15:22:47.3009700Z ##[debug]....=> 'True'
2020-10-22T15:22:47.3115760Z ##[debug]..=> True
2020-10-22T15:22:47.3200310Z ##[debug]=> True
2020-10-22T15:22:47.3298000Z ##[debug]Expanded: and(True, in('true', 'True', 'true', '1'))
2020-10-22T15:22:47.3380030Z ##[debug]Result: True
2020-10-22T15:22:47.3450310Z ##[section]Запускается: Patch files AppSettings.json
2020-10-22T15:22:47.3674040Z ==============================================================================
2020-10-22T15:22:47.3717530Z Task         : Patch JSON Files
2020-10-22T15:22:47.3758810Z Description  : Patch JSON files using JSON patch syntax
2020-10-22T15:22:47.3800200Z Version      : 4.0.1007
2020-10-22T15:22:47.3840870Z Author       : Geek Learning
2020-10-22T15:22:47.3882900Z Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-file-patch/wiki/Patch-JSON-Files) (Version 4.0.1007)
2020-10-22T15:22:47.3927940Z ==============================================================================
2020-10-22T15:22:47.4513000Z ##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
2020-10-22T15:22:47.4639800Z ##[debug]System.Exception: The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.<RunAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.<RunStepAsync>d__1.MoveNext()
2020-10-22T15:22:47.4718140Z ##[section]Завершается: Patch files AppSettings.json

System information

VSTS or TFS:

  • [ ] VSTS
  • [x] TFS

Agent:

  • [x] Hosted
  • [ ] Custom

OS:

  • [ ] Windows
  • [x] Mac
  • [ ] Linux

djonik1562 avatar Oct 22 '20 15:10 djonik1562