Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pkg): display if any of multiple attributes exist (npm#7855)
<!-- What / Why --> <!-- Describe the request in detail. What it does and why it's being changed. --> See npm#7854 for the why and more details. I changed the unwrap logic so that it only runs when the result contains one entry and the amount of arguments is one. Otherwise, when multiple arguments are provided the unwrap results in an undefined. Additionally, I think it makes sense to skip the unwrap logic when the result contains one entry and pkg has multiple arguments because you would expect an object. In the existing comment above the if-statement, it is mentioned the CLI should not unwrap at all. I chose not to do this because it is not clear to me if this is a final decision and has a large impact. However, if it is the desired direction, I am happy to do the work. ## References Fixes npm#7854
- Loading branch information