Skip to content

Commit b96facd

Browse files
feat: checkout state/rules files after pull and clone
1 parent 537d6f8 commit b96facd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • rust/modal/src/cmds/contract

rust/modal/src/cmds/contract/pull.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ pub async fn run(opts: &Opts) -> Result<()> {
198198
}
199199
}
200200

201+
// Reconstruct state/rules files from commits
202+
if !pulled_ids.is_empty() {
203+
store.checkout_state()?;
204+
}
205+
201206
if opts.output == "json" {
202207
println!("{}", serde_json::to_string_pretty(&json!({
203208
"status": "pulled",
@@ -312,6 +317,9 @@ async fn clone_from_url(url: &str, opts: &Opts) -> Result<()> {
312317
store.set_head(head)?;
313318
store.set_remote_head(&opts.remote_name, head)?;
314319

320+
// Reconstruct state/rules files from commits
321+
store.checkout_state()?;
322+
315323
if opts.output == "json" {
316324
println!("{}", serde_json::to_string_pretty(&json!({
317325
"status": "cloned",

0 commit comments

Comments
 (0)