From 552d45c6134233bfddad406c65e54f0f5a57013b Mon Sep 17 00:00:00 2001 From: DarthMooMancer Date: Sun, 11 May 2025 07:22:08 -0400 Subject: [PATCH] feat: adding temporary bash walkup as a possible fix to .polydev files --- walkup.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 walkup.sh diff --git a/walkup.sh b/walkup.sh new file mode 100755 index 0000000..3b8d1a4 --- /dev/null +++ b/walkup.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Start from the current directory +DIR="$(pwd)" + +# Walk up until we find a marker or reach root +while [[ ! -f "$DIR/CMakeLists.txt" && \ + ! -f "$DIR/package.json" && \ + ! -d "$DIR/.git" && \ + "$DIR" != "/" ]]; do + DIR="$(dirname "$DIR")" +done + +# Check if root was reached without finding anything +if [[ "$DIR" == "/" ]]; then + echo "❌ Project root not found." + exit 1 +fi + +echo "✅ Project root found at: $DIR" +