MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
445 stars 155 forks source link

Do not change the strict mode setting for the user's PowerShell session #296

Closed jhoneill closed 4 years ago

jhoneill commented 4 years ago

Strict mode is a user choice. Code should be developed and tested so that it does not fail if the user selects the strictest mode, but changing strict mode on loading will break other code which assumed the mode was relaxed.

There are 3 places where strict mode is turned on.

Private\callMembershipAPI.ps1:12 Private\common.ps1:1 Public\Test-VSTeamMembership.ps1:11:

These appear to be errors, because if the intent were to run the module in strict mode I would expect it to be set once for the whole module

(I have changed this in my branch :-) )

DarqueWarrior commented 4 years ago

Thanks for all the great feedback. Please keep it coming.

SebastianSchuetze commented 4 years ago

@DarqueWarrior will you do it in your review PR or should I make a PR for this issue and #297

BTW. accidentally closed the issue. Too fat fingers on mobile... 😬

DarqueWarrior commented 4 years ago

I will look at both of these today.

DarqueWarrior commented 4 years ago

Fixed