Skip to content

Commit

Permalink
fix(rust): update the project state when it is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
etorreborre authored and polvorin committed Nov 29, 2023
1 parent dac8bbb commit 8f9a64d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ async fn get_user_project(
}
};

check_project_readiness(opts, ctx, node, project.clone()).await?;
let project = check_project_readiness(opts, ctx, node, project.clone()).await?;
// store the updated project
opts.state.store_project(project.clone()).await?;

opts.terminal.write_line(&fmt_ok!(
"Marked this project as your default project, on this machine.\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ async fn run_impl(
let controller = node.create_controller().await?;
check_for_completion(&opts, ctx, &controller, &operation_id).await?;
let project = check_project_readiness(&opts, ctx, &node, project).await?;
// update the project state when it's ready
opts.state.store_project(project.clone()).await?;
opts.println(&project)?;
Ok(())
}

0 comments on commit 8f9a64d

Please sign in to comment.