-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: input.stream is null when copied for namespaced commands (#135)
* Fix issue where input copies did not include stream, leading to null errors in some cases. * Add appropriate tests. * Fix to meet pre-commit requirements. * Remove unneeded test in test_command.py Co-authored-by: Chad Crawford <chadcr@amazon.com>
- Loading branch information
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
|
||
from cleo.commands.command import Command | ||
|
||
|
||
class Foo3Command(Command): | ||
|
||
name = "foo3" | ||
|
||
description = "The foo3 bar command" | ||
|
||
aliases = ["foo3"] | ||
|
||
def handle(self) -> int: | ||
question = self.ask("echo:") | ||
self.line(question) | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
|
||
from cleo.commands.command import Command | ||
|
||
|
||
class FooSubNamespaced3Command(Command): | ||
|
||
name = "foo bar" | ||
|
||
description = "The foo bar command" | ||
|
||
aliases = ["foobar"] | ||
|
||
def handle(self) -> int: | ||
question = self.ask("") | ||
self.line(question) | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters