summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-04-25 01:56:01 +0200
committermo8it <mo8it@proton.me>2024-04-25 01:56:01 +0200
commit67fa01774223b08833c21baeb13bdec9e4a298a0 (patch)
tree1892075e96fb9bb39272ae0e4e0a4b572197035d /src/main.rs
parentd8c2ab8349854cbc7f4a994c7413d266cc38bc24 (diff)
Use os_pipe
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 790fff6..a928504 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -75,10 +75,14 @@ enum Subcommands {
Dev(DevCommands),
}
+fn in_official_repo() -> bool {
+ Path::new("dev/rustlings-repo.txt").exists()
+}
+
fn main() -> Result<()> {
let args = Args::parse();
- if !DEBUG_PROFILE && Path::new("dev/rustlings-repo.txt").exists() {
+ if !DEBUG_PROFILE && in_official_repo() {
bail!("{OLD_METHOD_ERR}");
}