Skip to content
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

Unify command execution in sudo.ps1 #46

Open
shailist opened this issue Feb 12, 2024 · 1 comment
Open

Unify command execution in sudo.ps1 #46

shailist opened this issue Feb 12, 2024 · 1 comment
Labels
Issue-Task It's a feature request, but it doesn't really need a major design.
Milestone

Comments

@shailist
Copy link

Description of the new feature / enhancement

There are 3 places in the sudo.ps1 script that execute SUDOEXE in the following manner:

if (($psversiontable.psversion.major -eq 7) -and ($__SUDO_DEBUG -eq $true)) {
	Trace-Command -PSHOST -name param* -Expression { & $SUDOEXE ... }
}
else {
	& $SUDOEXE ...
}

Maybe export this logic to a function Run-Sudo or something along those lines?

Scenario when this would be used?

Any future change, bugfix, or improvement to the sudo executable or sudo script that need to be addressed at the points of command execution will only need to be applied in 1 place.

Supporting information

No response

@shailist shailist added Issue-Feature New feature or request. Complex enough to require planning and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 12, 2024
@joadoumie joadoumie added Issue-Task It's a feature request, but it doesn't really need a major design. and removed Issue-Feature New feature or request. Complex enough to require planning and actual budgeted, scheduled work. labels Feb 28, 2024
@joadoumie joadoumie added this to the Backlog milestone Feb 28, 2024
@joadoumie
Copy link
Collaborator

Thanks for your feedback! I've added this to our backlog.

@joadoumie joadoumie removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Task It's a feature request, but it doesn't really need a major design.
Projects
None yet
Development

No branches or pull requests

2 participants