Command.from_path()
This commit is contained in:
parent
3873e806b0
commit
80ca0f0b1b
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user