Skip to content

Commit c3cd9a0

Browse files
author
Test
committed
Make conditional output based on the GIV_DEBUG flag
- Use debug flag for APP_DIR printing - Use debug flag for LIB_DIR printing - Remove unused project module
1 parent 48a35df commit c3cd9a0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/giv.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ SCRIPT_DIR="$(get_script_dir "${SCRIPT_PATH}")"
8787

8888
PLATFORM="$(detect_platform)"
8989
APP_DIR="$(compute_app_dir)"
90-
printf 'Using giv app directory: %s\n' "${APP_DIR}"
90+
[ "$GIV_DEBUG" = "true" ] && printf 'Using giv app directory: %s\n' "${APP_DIR}"
9191
LIB_DIR=""
9292
TEMPLATE_DIR=""
9393
DOCS_DIR=""
@@ -108,7 +108,7 @@ else
108108
fi
109109
GIV_LIB_DIR="${LIB_DIR}"
110110

111-
printf 'Using giv lib directory: %s\n' "${GIV_LIB_DIR}"
111+
[ "$GIV_DEBUG" = "true" ] && printf 'Using giv lib directory: %s\n' "${GIV_LIB_DIR}"
112112

113113
# Template location
114114
if [ -n "${GIV_TEMPLATE_DIR:-}" ]; then
@@ -149,8 +149,6 @@ GIV_DOCS_DIR="${DOCS_DIR}"
149149
. "${LIB_DIR}/markdown.sh"
150150
# shellcheck source=llm.sh
151151
. "${LIB_DIR}/llm.sh"
152-
# shellcheck source=project.sh
153-
. "${LIB_DIR}/project.sh"
154152
# shellcheck source=project/metadata.sh
155153
. "${LIB_DIR}/project/metadata.sh"
156154
# shellcheck source=history.sh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## NOTE: Keeping this around in case we want to create a provider for auto that does
2+
## basic metadata extraction from the current directory.
3+
14
# Locate the project from the codebase. Looks for common project files
25
# like package.json, pyproject.toml, setup.py, Cargo.toml, composer.json
36
# build.gradle, pom.xml, etc. and extracts the project name.

0 commit comments

Comments
 (0)