Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
set -euo pipefail

here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
( cd "$here" && ./mvnw -q --batch-mode package )

# Keep the downloaded artifacts and the Maven distribution out of the developer's ~/.m2. The path is
# stable so the plugin closure stays cached between runs; point SOCKET_CLI_MAVEN_HOME elsewhere for a
# cold build.
tmp_root="${TMPDIR:-/tmp}"
maven_home="${SOCKET_CLI_MAVEN_HOME:-${tmp_root%/}/socket-cli-maven-home}"
mkdir -p "$maven_home"

(
cd "$here"
MAVEN_USER_HOME="$maven_home" ./mvnw -q --batch-mode \
-Dmaven.repo.local="$maven_home/repository" package

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relative cache path cwd mismatch

Medium Severity

When SOCKET_CLI_MAVEN_HOME or TMPDIR is a relative path, mkdir -p uses the caller’s working directory, but MAVEN_USER_HOME and -Dmaven.repo.local are applied after cd into the extension directory, so Maven and the wrapper write to a different tree than the one created upfront.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2e7512b. Configure here.

)
cp -f "$here/target/coana-maven-extension.jar" "$here/coana-maven-extension.jar"
echo "Coana Maven extension jar: $here/coana-maven-extension.jar"
Loading