You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
office-addin-manifest should return an error code when the specified manifest filepath is non-existent.
Current behavior
The tools returns a success code.
Steps to Reproduce
Run office-addin-manifest validate not-a-dir/manifest.xml
ENOENT error is printed, but the command's return code is 0.
Context
It looks like this issue has been previously raised and fixed (#372), so this may be a regression. EDIT: looks like that PR prints the appropriate error message, but doesn't change the exit code.
Operating System: Debian 11
Node version: 20.12.0
Office version:
Tool version: 1.13.0
Failure Logs
$ npx office-addin-manifest validate not-a-dir/manifest.xml; echo $?
Error: Unable to read data for manifest file: not-a-dir/manifest.xml.
Error: ENOENT: no such file or directory, open 'not-a-dir/manifest.xml'
0
The text was updated successfully, but these errors were encountered:
@tobz1000 it is most likely that when we catch an error, we are just outputting the message and then gracefully completing rather than returning an error code. What is your scenario where you need the specific error code even when the output displays the error?
Since the command is for validating the manifest file, it would make sense to return an error if the file can't be found at all. I use the command in a linting script for my codebase. If the manifest filepath is incorrect, the script returns success, suggesting no errors; but it should fail, as the manifest possibly doesn't even exist.
Thanks for reporting this issue regarding office-addin-manifest validate script not returning the proper error code for this case. It has been put on our backlog. We unfortunately have no timelines to share at this point. However, I would suggest as a workaround that you validate the existence of the manifest before using the office-addin-manifest validate script.
Expected behavior
office-addin-manifest
should return an error code when the specified manifest filepath is non-existent.Current behavior
The tools returns a success code.
Steps to Reproduce
office-addin-manifest validate not-a-dir/manifest.xml
Context
It looks like this issue has been previously raised and fixed (#372),
so this may be a regression. EDIT: looks like that PR prints the appropriate error message, but doesn't change the exit code.Office version:Failure Logs
The text was updated successfully, but these errors were encountered: