0

当我homestead up在控制台上运行时,出现如下语法错误:

 There is a syntax error in the following Vagrantfile. The syntax error
 message is reproduced below for convenience:

 C:/Users/Evan Oscar/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:6: syntax error, unexpected $undefined, expecting ')'
 ..."C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\homestead...
 ...                               ^
 C:/Users/Evan Oscar/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:7: syntax error, unexpected tCONSTANT, expecting end-of-input
 ...criptPath = File.expand_path("C:\cygwin64\home\Evan Oscar\.h...
 ...                               ^

有人可以告诉我是什么导致了语法错误吗?
我认为PATH是我的homestead.yaml文件夹导致了问题?

这是PATH来自我的 Vagrantfile:

homesteadYamlPath = File.expand_path("C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\homestead.yaml")
afterScriptPath = File.expand_path("C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\after.sh")
aliasesPath = File.expand_path("C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\aliases")
4

1 回答 1

0

您不应该Evan Oscar在路径中使用双引号。

你应该在这里:

homesteadYamlPath = File.expand_path("C:\cygwin64\home\Evan Oscar\.homestead\.vagrant\homestead.yaml")
afterScriptPath = File.expand_path("C:\cygwin64\home\Evan Oscar\.homestead\.vagrant\after.sh")
aliasesPath = File.expand_path("C:\cygwin64\home\Evan Oscar\.homestead\.vagrant\aliases")

并不是

homesteadYamlPath = File.expand_path("C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\homestead.yaml")
afterScriptPath = File.expand_path("C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\after.sh")
aliasesPath = File.expand_path("C:\cygwin64\home\"Evan Oscar"\.homestead\.vagrant\aliases")
于 2015-03-13T18:35:03.567 回答