Skip to content

Commit 097d4f6

Browse files
jessealamaclaude
andcommitted
Fix shellcheck error in lean/helpers/build
Refactor the build script to follow the pattern used by other ecosystems (like Julia). The script now: - Requires DEPENDABOT_NATIVE_HELPERS_PATH to be set (fails early if not) - Properly uses helpers_dir and install_dir variables throughout - Removes the unused variable that triggered SC2034 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent fad05f9 commit 097d4f6

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lean/helpers/build

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44

55
set -e
66

7-
install_dir="${DEPENDABOT_NATIVE_HELPERS_PATH:-$(dirname "$0")}"
7+
if [ -z "$DEPENDABOT_NATIVE_HELPERS_PATH" ]; then
8+
echo "Unable to build, DEPENDABOT_NATIVE_HELPERS_PATH is not set"
9+
exit 1
10+
fi
11+
12+
helpers_dir=$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)
13+
install_dir="$DEPENDABOT_NATIVE_HELPERS_PATH/lean"
14+
15+
mkdir -p "$install_dir"
816

917
# Install elan if not already installed
1018
if ! command -v elan &> /dev/null; then
@@ -21,12 +29,7 @@ else
2129
fi
2230

2331
# Copy helper files to install directory
24-
if [ -n "$DEPENDABOT_NATIVE_HELPERS_PATH" ]; then
25-
lean_install_dir="$DEPENDABOT_NATIVE_HELPERS_PATH/lean"
26-
mkdir -p "$lean_install_dir"
27-
cp -r "$(dirname "$0")"/* "$lean_install_dir/"
28-
chmod +x "$lean_install_dir/run.sh"
29-
echo "Lean helpers installed to $lean_install_dir"
30-
fi
32+
cp -r "$helpers_dir"/* "$install_dir/"
33+
chmod +x "$install_dir/run.sh"
3134

32-
echo "Lean native helpers build complete"
35+
echo "Lean helpers installed to $install_dir"

0 commit comments

Comments
 (0)