Skip to content

Commit 2be2a4e

Browse files
Fix test script to use local CLI and make init await properly
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
1 parent 6b7adab commit 2be2a4e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test-quick.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ trap cleanup EXIT
3838
main() {
3939
print_section "ObjectDocs Quick Build Test"
4040

41+
# Detect monorepo root BEFORE changing directories
42+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
43+
MONOREPO_ROOT="${SCRIPT_DIR}"
44+
4145
# Create test project
4246
mkdir -p "$TEST_DIR"
4347
cd "$TEST_DIR"
@@ -46,9 +50,6 @@ main() {
4650
print_success "Initialized project"
4751

4852
# Install CLI from workspace (detect monorepo root)
49-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
50-
MONOREPO_ROOT="${SCRIPT_DIR}"
51-
5253
if [ -d "$MONOREPO_ROOT/packages/cli" ]; then
5354
pnpm add -D "$MONOREPO_ROOT/packages/cli"
5455
print_success "Installed @objectdocs/cli from local workspace"

0 commit comments

Comments
 (0)