Skip to content

Conversation

@Silic0nS0ldier
Copy link

Adds status function to Command instances to allow running of child processes with stdin connected, such as a shell like bash. Unlike spawn this implicitly waits for the child process to exit.

The function's name status is borrowed from the Rust standard library.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes
    Support for interactive child processes via ctx.std.process.command("APP_NAME").status().

Test plan

  • Covered by existing test cases New API surface.
  • New test cases added No test cases for spawn(), so nothing to build upon.
  • Manual testing; please provide instructions so we can reproduce:
    def _impl(ctx):
        shell = ctx.std.env.var("SHELL") or "sh"
        print("Running " + shell)
        cmd = ctx.std.process.command(shell)
        result = cmd.status()
        print(shell + " finished with exit code " + str(result.code))
    test_task = task(
       name = "test-task",
       implementation = _impl,
    )
    Then integrate the task with MODULE.aspect and run aspect test-task.
    When in the interactive shell use exit (or whatever applies to your shell) to resume the task.

@Silic0nS0ldier
Copy link
Author

Motivation for this contribution is to allow porting of an edit patches workflow over to Aspect CLI.

An interactive shell (running in a temporary directory) is used to allow users a chance to edit and create new commits, on exit (provided there are no uncommitted changes) patches are generated from commits on top of the baseline (a branch, tag, or an initial generated commit when working on source archives).

@alexeagle alexeagle assigned thesayyn and unassigned thesayyn Nov 26, 2025
@alexeagle alexeagle requested a review from thesayyn November 26, 2025 15:14
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.

2 participants