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: Don't set newLineWritten to true unless verbosity allows output #54127

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

ConnySjoblom
Copy link
Contributor

This PR fixes the following spacing issue in command output when using NewLineAware output.

This simple command has two info outputs

    public function handle(): void
    {
        $this->components->info('Foo', OutputInterface::VERBOSITY_VERBOSE);
        $this->components->info('Bar', OutputInterface::VERBOSITY_NORMAL);
    }

If it is ran with normal verbosity the spacing will be wrong

 $ artisan foo
   INFO  Bar.

While with verbose it looks like this:

 $ artisan foo -v

   INFO  Foo.

   INFO  Bar.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@taylorotwell taylorotwell merged commit 6291298 into laravel:11.x Jan 9, 2025
40 checks passed
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.

None yet

2 participants