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

Fix Rake.verbose to return true/false even if unset #567

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zenspider
Copy link
Contributor

@zenspider zenspider commented May 11, 2024

Unset returns FileUtilsExt.verbose_flag which is set to Object.new by default, which is truthy. Compare against DEFAULT and return verbose_flag only if set.

This is made extra confusing by the fact that this project uses its own TestTask which sets verbose outside of the test run... so this extends the verbose test by setting it back to DEFAULT.

Unset returns FileUtilsExt.verbose_flag which is set to Object.new by
default, which is truthy. Compare against DEFAULT and return
verbose_flag only if set.
zenspider added a commit to minitest/minitest that referenced this pull request May 11, 2024
…, but until then, compare against true.

[git-p4: depot-paths = "//src/minitest/dev/": change = 14139]
@zenspider
Copy link
Contributor Author

@hsbt comment pls?

@@ -105,6 +105,8 @@ def test_safe_ln_fails_on_script_error
end

def test_verbose
RakeFileUtils.verbose_flag = Rake::FileUtilsExt::DEFAULT
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary? In my understanding, your change is for without above line.

@jasonkarns
Copy link
Contributor

Additionally Rake.verbose? would be nice?

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

Successfully merging this pull request may close these issues.

3 participants