-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-install.sh
More file actions
52 lines (40 loc) Β· 1.25 KB
/
debug-install.sh
File metadata and controls
52 lines (40 loc) Β· 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Debug script for package installation issues
echo "π Debugging Package Installation..."
# Check if we're in DDEV
if [ -z "$DDEV_PROJECT" ]; then
echo "β Not in DDEV environment"
exit 1
fi
echo "β
In DDEV environment: $DDEV_PROJECT"
# Create test Laravel project
echo "π¦ Creating test Laravel project..."
rm -rf /tmp/test-laravel-debug
composer create-project laravel/laravel /tmp/test-laravel-debug --prefer-dist --quiet
if [ $? -ne 0 ]; then
echo "β Failed to create Laravel project"
exit 1
fi
echo "β
Laravel project created"
# Try to install package
echo "π¦ Installing package..."
cd /tmp/test-laravel-debug
composer config repositories.local path /var/www/html
composer require ndestates/laravel-model-schema-checker *@dev --quiet
if [ $? -ne 0 ]; then
echo "β Package installation failed"
echo "π Checking Laravel logs..."
tail -20 storage/logs/laravel.log 2>/dev/null || echo "No Laravel logs found"
exit 1
fi
echo "β
Package installed successfully"
# Test basic functionality
echo "π§ͺ Testing basic functionality..."
php artisan model:schema-check --help
if [ $? -eq 0 ]; then
echo "β
Command help works"
else
echo "β Command help failed"
exit 1
fi
echo "π All tests passed!"