Skip to content

Commit 45d5564

Browse files
committed
fix: Remove vendor directories when installing a T20+ site
1 parent 9481a16 commit 45d5564

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

shell/site-aliases.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
# Perform a fresh install of Totara
55
install() {
66
site_root || return 1
7+
8+
local version=$(totara_version major)
9+
if [[ $version -ge 20 ]]; then
10+
# From Totara 20 onwards, composer packages aren't included in the repo,
11+
# so we need to remove any existing vendor directories to ensure a clean install.
12+
rm -rf vendor server/vendor
13+
fi
14+
715
if [[ -z "$1" ]]; then
816
# Make the site name the version of the Totara site
9-
local site_name="Totara $(totara_version major) development site"
17+
local site_name="Totara $version development site"
1018
run_totara_cmd php admin/cli/install_database.php --adminpass=admin --adminemail=admin@example.com --agree-license --shortname=$site_name --fullname=$site_name
1119
else
1220
run_totara_cmd php admin/cli/install_database.php $@

0 commit comments

Comments
 (0)