@@ -41,13 +41,16 @@ pub struct Oci {
4141
4242#[ derive( Debug , Deserialize , Clone , PartialEq ) ]
4343pub struct PostDownloadHook {
44- /// Absolute path to the command/executable (e.g., "/bin/bash", "/usr/bin/python3").
45- /// This is the interpreter or tool that will execute the script.
44+ /// Path to the command/executable to run.
45+ /// Can be an absolute path (e.g., "/bin/bash") or a command name to search in PATH (e.g., "bash").
46+ /// Supports shell interpreters or direct binaries.
4647 pub path : TemplateableValue < String > ,
4748
48- /// Arguments passed to the command. First element should be the script path (absolute),
49- /// followed by additional arguments for the script.
50- /// Example: ["install.sh", "--check-dependencies", "--verbose"]
49+ /// Arguments passed to the command.
50+ /// - When using a shell: first arg is typically the script path, followed by script arguments
51+ /// Example: ["/path/to/install.sh", "--check-dependencies", "--verbose"]
52+ /// - When using a binary directly: arguments for that binary (can be empty)
53+ /// Example: ["--flag", "value"] or []
5154 pub args : Vec < TemplateableValue < String > > ,
5255
5356 /// Environmental variables passed to the process.
@@ -123,12 +126,6 @@ impl Templateable for PostDownloadHook {
123126 . map ( |arg| arg. template_with ( variables) )
124127 . collect :: < Result < Vec < String > , AgentTypeError > > ( ) ?;
125128
126- if args. is_empty ( ) {
127- return Err ( AgentTypeError :: OCIReferenceParsingError (
128- "post_download_hook args must have at least 1 element: the script path" . to_string ( ) ,
129- ) ) ;
130- }
131-
132129 let env: HashMap < String , String > = self
133130 . env
134131 . into_iter ( )
0 commit comments