1

I am using Azure pipeline with Self-hosted Windows agents to run a local script init.cmd, which is mainly for alias setting with doskey. I am using the following YAML file to configure the pipeline

trigger:
- master

pool: $(AGENT_POOL)

steps:
- script: |
    init.cmd
    build
  displayName: 'init.cmd'
  workingDirectory: $(CODE_BASE)

the alias setting seems not to work:

'build' is not recognized as an internal or external command
licaomeng
  • 919
  • 2
  • 13
  • 27
  • You are using build command. Does it exist in workingDirectory: $(CODE_BASE)? – Andriy Bilous Apr 12 '21 at 07:23
  • @AndriyBilous `build` is an alias, which will be in effect after run `init.cmd`. it will go well after run `build` if we use the manual command rather than putting them in the Azure pipeline. – licaomeng Apr 12 '21 at 07:29
  • Could you please share code from init.cmd? – Andriy Bilous Apr 12 '21 at 07:48
  • What is your build command? Do you mean you need to use this commend under the Doskey.exe? Could you please share us the screenshots about the manual command on your local machine? – Felix Apr 13 '21 at 02:30

0 Answers0