Azure-docs: I think there's a typo in the appcmd example

Created on 11 Feb 2020  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

I don't think DO is a valid keyword to follow an IF


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author cloud-servicesvc doc-bug triaged

All 6 comments

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

@mimckitt @savyasachisamal

Samal, can you please check the startup task and appropriate comments?

If possible please provide with the updated code.

@maf1024 I can test this and confirm. However did you run the code and experience any issues?

I am not seeing an issue with the documentation. @maf1024 if you are getting a specific error please let me know and I can take a further look.

Try entering this in a cmd:
IF 1 EQU 1 DO DIR

It fails with "'DO' is not recognized as an internal or external command, operable program or batch file."

That same effective syntax is used in the page's script:
IF %ERRORLEVEL% EQU 183 DO VERIFY > NUL

Looks like the "DO" was added by mistake.

Should have been "IF %ERRORLEVEL% EQU 183 VERIFY > NUL"

Submitted a fix and once the PR merges the changes will go live after a few hours.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jharbieh picture jharbieh  Â·  3Comments

behnam89 picture behnam89  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments