Replace invalid disk name characters with underscore

This commit is contained in:
Brian Cain 2020-05-13 14:19:28 -07:00
parent 96d19264b6
commit c063ca6100
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0

View File

@ -119,7 +119,7 @@ module VagrantPlugins
if @name.is_a?(String) && @name.match(FILE_CHAR_REGEX)
@logger.warn("Vagrant will remove detected invalid characters in '#{@name}' and convert the disk name into something usable for a file")
@name.gsub!(FILE_CHAR_REGEX, "")
@name.gsub!(FILE_CHAR_REGEX, "_")
elsif @name == UNSET_VALUE
if @primary
@name = "vagrant_primary"