summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
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}");
}