fix(init): do not migrate package.json on error
This commit is contained in:
parent
c3d45a0153
commit
8500e331eb
1 changed files with 4 additions and 1 deletions
|
|
@ -1300,7 +1300,10 @@ fn run() -> Result<()> {
|
|||
let migrated = if !current_dir.join("tree-sitter.json").exists()
|
||||
&& current_dir.join("package.json").exists()
|
||||
{
|
||||
migrate_package_json(¤t_dir).with_context(|| "Failed to migrate package.json")?
|
||||
migrate_package_json(¤t_dir).is_ok_and(|_| {
|
||||
eprintln!("Failed to migrate package.json");
|
||||
false
|
||||
})
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue