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

(#3621) Skip trace warning when trace not used #3623

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

AdmiringWorm
Copy link
Member

Description Of Changes

This updates the warning that is outputted in non-elevated mode to not
be outputted when the user has not specified --trace on the
commandline.

Motivation and Context

Without this change, any time a use are running in a non-elevated mode,
they will always have the trace warning outputted even when they haven't
used the argument.

Testing

Do the following tests in a non-elevated window.

  1. Run choco search chocolatey (or any other command not requiring admin privileges).
  2. Ensure that the warning about --trace not being supported are not shown.
  3. Run the same command again and specify --trace .
  4. Ensure that the warning about --trace are now outputted.

In an admin window repeat the above tests, verifying that the trace warning is not outputted.

Operating Systems Testing

  • Windows 10

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added. (No relevant tests to add)
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issue

Fixes #3621

This updates the warning that is outputted in non-elevated mode to not
be outputted when the user has not specified `--trace` on the
commandline.

Without this change, any time a use are running in a non-elevated mode,
they will always have the trace warning outputted even when they haven't
used the argument.
@AdmiringWorm AdmiringWorm requested a review from a team as a code owner February 3, 2025 16:37
@AdmiringWorm AdmiringWorm requested a review from pauby February 3, 2025 16:37
@AdmiringWorm AdmiringWorm self-assigned this Feb 3, 2025
@AdmiringWorm AdmiringWorm requested review from gep13 and removed request for pauby February 3, 2025 16:37
@AdmiringWorm AdmiringWorm changed the base branch from develop to hotfix/1.4.3 February 3, 2025 16:37
@corbob corbob removed the request for review from a team February 3, 2025 17:15
This includes some updates to improve the release process from Support
Branches.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gep13
Copy link
Member

gep13 commented Feb 4, 2025

The failing build here is on Ubuntu, which has been seeing issues lately, so going to ignore for the purposes of getting this PR merged.

@gep13 gep13 merged commit b88f205 into chocolatey:hotfix/1.4.3 Feb 4, 2025
4 of 5 checks passed
@AdmiringWorm AdmiringWorm deleted the trace-fix branch February 4, 2025 10:52
@gep13
Copy link
Member

gep13 commented Feb 4, 2025

@AdmiringWorm thanks for getting this fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trace warning is outputted even when --trace argument is not used
2 participants