8000 Make PowerShell able to enable logging of script block execution on Unix platforms by daxian-dbw · Pull Request #5791 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Make PowerShell able to enable logging of script block execution on Unix platforms #5791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address one of Dan's comments
  • Loading branch information
daxian-dbw committed Jan 5, 2018
commit 167bbad1d116ac41c2396eddeea7ddfcb07d1da9
Original file line number Diff line number Diff line change
Expand Up @@ -4756,10 +4756,9 @@ internal static ModuleLoggingGroupPolicyStatus GetModuleLoggingInformation(out I
{
if (moduleLogging.EnableModuleLogging == false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need multiple return paths? Why not if (... == false) else if (... == true) and set status in both cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't change the original code, will update it to set status in both cases.

{
return ModuleLoggingGroupPolicyStatus.Disabled;
status = ModuleLoggingGroupPolicyStatus.Disabled;
}

if (moduleLogging.EnableModuleLogging == true)
else if (moduleLogging.EnableModuleLogging == true)
{
status = ModuleLoggingGroupPolicyStatus.Enabled;
moduleNames = moduleLogging.ModuleNames;
Expand Down
0