Skip to content

Commit

Permalink
fix(lsp): Pass --program-dir to test command from codelens
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Aug 11, 2023
1 parent 7834fce commit 58cb6f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ fn on_code_lens_request(
title: TEST_CODELENS_TITLE.into(),
command: TEST_COMMAND.into(),
arguments: Some(vec![
"--program-dir".into(),
format!("{}", workspace.root_dir.display()).into(),
"--package".into(),
format!("{}", package.name).into(),
"--exact".into(),
Expand Down
1 change: 1 addition & 0 deletions crates/nargo_cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct NargoCli {
#[non_exhaustive]
#[derive(Args, Clone, Debug)]
pub(crate) struct NargoConfig {
// REMINDER: Also change this flag in the LSP test lens if renamed
#[arg(short, long, hide=true, global=true, default_value_os_t = std::env::current_dir().unwrap())]
program_dir: PathBuf,
}
Expand Down

0 comments on commit 58cb6f0

Please sign in to comment.