Support spaces in project folder name

This commit is contained in:
Chris Thompson 2018-08-29 15:47:06 -04:00
parent 31e0d11415
commit 78235a052d
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
def set_overrides_per_project(config)
# Acquire a hostname from the project root
project_dir_name = File.basename(ENV['DRUPALVM_PROJECT_ROOT']).gsub("_", "-")
project_dir_name = File.basename(ENV['DRUPALVM_PROJECT_ROOT']).gsub("_", "-").gsub(" ", "-")
host_name = "#{project_dir_name}.test"
# Override all vconfig values with the new names

View file

@ -7,9 +7,9 @@
delegate_to: localhost
become: false
- name: remove underscores from folder name
- name: remove spaces and underscores from folder name
set_fact:
proj_root_safe: "{{ proj_root.stdout|basename|replace('_','-') }}"
proj_root_safe: "{{ proj_root.stdout|basename|replace('_','-')|replace(' ','-') }}"
# These values are NOT honored by Vagrant, but are still necessary for DrupalVM
# See also provisioning/box/config