Closed WJurecki closed 5 years ago
@WJurecki - Thanks for opening this up! I'm on it, I appreciate the detail!
@WJurecki - Fields
is working correctly now:
with default behavior untouched and still picking up the default value for Projection
:
Hey @WJurecki - This has been deployed in v2.28.0! Let me know if all is well or if you are seeing any issues!
Hey @scrthq - This works great. Thanks!
You bet @WJurecki !!
Describe the bug When
Get-GSDriveFile
is executed with the-Fields
parameter is not honored and all fields are returned.This is caused because
-Fields
is only evaluated if-Projection
is not specified, however-Projection
has a default defined as 'Full' and there is no way to prevent this. Therefore,-Fields
are never evaluated and utilized.To Reproduce Steps to reproduce the behavior:
Get-GSDriveFile -FileId '1234'
Get-GSDriveFile -FileId '1234' -Fields 'id'
Both have same result with all fields returned and populated.
Expected behavior when
Get-GSDriveFile -FileId '1234' -Fields 'id'
is used the returned object should only have theid
property filled.Comments Simply removing the default on
-Projection
fixes this immediate problem, but, significantly changes default behavior. Reversing the logic so as to check-Fields
first could allow a less impactful 'fix'. I'm not certain what to suggest as the best solution.Environment (please complete the following information):