File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
agent-control/src/agent_type/runtime_config/on_host Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,17 @@ impl<'de> Deserialize<'de> for FileEntry {
6868
6969 #[ derive( Deserialize ) ]
7070 struct PreValidationFileEntry {
71- path : PathBuf ,
71+ relative_path : PathBuf ,
7272 content : TemplateableValue < String > ,
7373 }
7474
7575 let entry = PreValidationFileEntry :: deserialize ( deserializer) ?;
7676 // Perform validations on the provided Paths
77- if let Err ( errs) = validate_file_entry_path ( & entry. path ) {
77+ if let Err ( errs) = validate_file_entry_path ( & entry. relative_path ) {
7878 Err ( Error :: custom ( errs. join ( ", " ) ) )
7979 } else {
8080 Ok ( Self {
81- relative_path : entry. path ,
81+ relative_path : entry. relative_path ,
8282 content : entry. content ,
8383 } )
8484 }
@@ -246,7 +246,10 @@ mod tests {
246246 #[ case] path : & str ,
247247 #[ case] validation : impl Fn ( Result < FileEntry , serde_yaml:: Error > ) -> bool ,
248248 ) {
249- let yaml = format ! ( "path: \" {}\" \n content: \" some random content\" " , path) ;
249+ let yaml = format ! (
250+ "relative_path: \" {}\" \n content: \" some random content\" " ,
251+ path
252+ ) ;
250253 let parsed = serde_yaml:: from_str :: < FileEntry > ( & yaml) ;
251254 let parsed_display = format ! ( "{parsed:?}" ) ;
252255 assert ! ( validation( parsed) , "{}" , parsed_display) ;
You can’t perform that action at this time.
0 commit comments