diff --git a/docs/manual.md b/docs/manual.md index 0a5d490f1..fdbeba812 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -463,6 +463,7 @@ See `microkit --help` for a full list of options. The path to the system description file, board to build the system for, and configuration to build for must be provided. The search paths provided tell the tool where to find any program images specified in the system description file. +The current working directory is always included as a search path. In the case of errors, a diagnostic message shall be output to `stderr` and a non-zero code returned. diff --git a/tool/microkit/src/main.rs b/tool/microkit/src/main.rs index 9e54b6b42..5b9f0a220 100644 --- a/tool/microkit/src/main.rs +++ b/tool/microkit/src/main.rs @@ -126,7 +126,7 @@ fn main() -> Result<(), String> { available_boards.sort(); let env_args: Vec<_> = std::env::args().collect(); - let args = match Args::parse(&env_args, &available_boards) { + let mut args = match Args::parse(&env_args, &available_boards) { Ok(result) => result, Err(ArgsError::HelpWanted) => { argparse::print_help(&available_boards); @@ -144,6 +144,7 @@ fn main() -> Result<(), String> { std::process::exit(1); } }; + args.search_paths.push(std::env::current_dir().unwrap()); let board_path = boards_path.join(&args.board); if !board_path.exists() {