From 80ca0f0b1ba04c1aa3d7bb1a62928dbcecbb3bd8 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 17 Mar 2025 21:22:10 -0400 Subject: Command.from_path() --- examples/commands/commands.tm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/commands/commands.tm b/examples/commands/commands.tm index 940dc3d9..a0e73908 100644 --- a/examples/commands/commands.tm +++ b/examples/commands/commands.tm @@ -32,6 +32,9 @@ struct ProgramResult(stdout:[Byte], stderr:[Byte], exit_type:ExitType): return none struct Command(command:Text, args=[:Text], env={:Text,Text}): + func from_path(path:Path, args=[:Text], env={:Text,Text} -> Command): + return Command(Text(path), args, env) + func run(command:Command, input="", input_bytes=[:Byte] -> ProgramResult): if input.length > 0: (&input_bytes):insert_all(input:bytes()) -- cgit v1.2.3