Skip to content

Commit

Permalink
Merge pull request #2731 from Varying-Vagrant-Vagrants/fix/vm_dir_sla…
Browse files Browse the repository at this point in the history
…shes

Prevent VM_DIR and VVV_PATH_TO_SITE having trailing slashes
  • Loading branch information
tomjn authored Sep 18, 2024
2 parents 0f0b0bd + 9dbcd29 commit 0ce4b25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ permalink: /docs/en-US/changelog/

* VVV will check if Parallels is installed before defaulting to docker on Arm64/Apple Silicon due to issues with Docker detection ( #2722 )
* Switched from Rackspace to Starburst services for MariaDB mirrors ( #2728 )
* Fixed an issue with trailing slashes and site provisioners introduced in an earlier version (#2731)

### Maintenance

Expand Down
4 changes: 2 additions & 2 deletions provision/provision-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SITE=$1
SITE_ESCAPED="${SITE//./\\.}"
REPO=$2
BRANCH=$3
VM_DIR=$4
VM_DIR="${4%/}" # No trailing strings
SKIP_PROVISIONING=$5
NGINX_UPSTREAM=$6
VVV_PATH_TO_SITE=${VM_DIR} # used in site templates
Expand Down Expand Up @@ -167,7 +167,7 @@ function vvv_provision_site_nginx_config() {

local NCONFIG
NCONFIG=$(vvv_search_replace_in_file "${SITE_NGINX_FILE}" "{vvv_path_to_folder}" "${DIR}")
NCONFIG=$(vvv_search_replace "${NCONFIG}" "{vvv_path_to_site}" "${VM_DIR}/")
NCONFIG=$(vvv_search_replace "${NCONFIG}" "{vvv_path_to_site}" "${VM_DIR}")
NCONFIG=$(vvv_search_replace "${NCONFIG}" "{vvv_site_name}" "${SITE_NAME}")
NCONFIG=$(vvv_search_replace "${NCONFIG}" "{vvv_hosts}" "${VVV_HOSTS}")

Expand Down

0 comments on commit 0ce4b25

Please sign in to comment.