extension_cli: Don't propagate errors caused by trying to read Cargo.toml
(#9641)
This PR fixes an issue where the extension CLI would error if a `Cargo.toml` didn't exist when we were trying to check for its existence. Since we're just checking if it exists for the purposes of detecting a Rust extension, we can safely ignore the errors. Also improved the logging/error handling in a few spots to make other errors easier to troubleshoot in the future. Release Notes: - N/A
This commit is contained in:
parent
e20508f66c
commit
3831088251
2 changed files with 14 additions and 5 deletions
|
@ -54,9 +54,11 @@ async fn main() -> Result<()> {
|
|||
args.output_dir
|
||||
};
|
||||
|
||||
log::info!("loading extension manifest");
|
||||
let mut manifest = ExtensionStore::load_extension_manifest(fs.clone(), &extension_path).await?;
|
||||
populate_default_paths(&mut manifest, &extension_path)?;
|
||||
|
||||
log::info!("compiling extension");
|
||||
let builder = ExtensionBuilder::new(scratch_dir);
|
||||
builder
|
||||
.compile_extension(
|
||||
|
@ -257,7 +259,7 @@ fn test_languages(
|
|||
Some(
|
||||
grammars
|
||||
.get(name.as_ref())
|
||||
.ok_or_else(|| anyhow!("language"))?,
|
||||
.ok_or_else(|| anyhow!("grammar not found: '{name}'"))?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue