Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/extending/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ Built-in `project:*` commands always take precedence. A plugin whose `@command`

Plugins run on the **host machine** via `PluginProxyCommand`. The plugin script is executed directly as a process with:

- A 300-second timeout
- TTY support when the terminal supports it (interactive commands work)
- No timeout -- plugins may run arbitrarily long (deploys, imports, shells).
You watch the output and press Ctrl-C to abort if it looks stuck.
- TTY support when the terminal supports it -- the plugin keeps the real
terminal, so colours and interactive prompts (`docker exec -it`, `read`, ...)
work as usual.
- Arguments appended to the script invocation
- Exit code forwarded to the caller

Expand Down
4 changes: 3 additions & 1 deletion src/Plugin/PluginProxyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
/** @var list<string> $command */
$command = array_merge([$this->plugin->scriptPath], is_array($args) ? array_values($args) : []);

$process = $this->processFactory->create($command, null, 300);
// No timeout: plugins may run arbitrarily long (deploys, imports,
// shells). The developer watches the output and aborts with Ctrl-C.
$process = $this->processFactory->create($command, null, null);

if (Process::isTtySupported() && $output instanceof ConsoleOutputInterface) {
$process->setTty(true);
Expand Down
Loading