summaryrefslogtreecommitdiff
path: root/src/dev/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/check.rs')
-rw-r--r--src/dev/check.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/dev/check.rs b/src/dev/check.rs
index 46d3ffe..9ae066b 100644
--- a/src/dev/check.rs
+++ b/src/dev/check.rs
@@ -1,5 +1,16 @@
-use anyhow::Result;
+use std::fs;
-pub fn check() -> Result<()> {
- todo!()
+use anyhow::{Context, Result};
+
+use crate::{info_file::InfoFile, init::cargo_toml};
+
+pub fn check(info_file: InfoFile) -> Result<()> {
+ // TODO: Add checks
+
+ fs::write("Cargo.toml", cargo_toml(&info_file.exercises))
+ .context("Failed to update the file `Cargo.toml`")?;
+
+ println!("Everything looks fine!");
+
+ Ok(())
}