From 6c86092efb6f20ff14446d541375c963658b8f2d Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sun, 1 Dec 2024 10:51:53 +0100 Subject: [PATCH] Added Talon notification if the user has cloned the monorepo (#2690) Related #https://github.com/cursorless-dev/cursorless/issues/1953 ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet --------- Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- dont_clone_monorepo.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 dont_clone_monorepo.py diff --git a/dont_clone_monorepo.py b/dont_clone_monorepo.py new file mode 100644 index 0000000000..b3e120ced1 --- /dev/null +++ b/dont_clone_monorepo.py @@ -0,0 +1,17 @@ +""" +This file exists in our monorepo so that if someone accidentally clones this monorepo +into their talon folder instead of cursorless-talon, they'll get a helpful error popup +""" + +from talon import app + + +def on_ready(): + app.notify( + "Whoops! You cloned our monorepo instead of cursorless-talon", + "Please remove cursorless and clone cursorless-talon instead:", + "https://github.com/cursorless-dev/cursorless-talon", + ) + + +app.register("ready", on_ready)