【发布时间】:2020-04-15 09:35:14
【问题描述】:
我有一个 symfony 系统,我正试图用 capistrano 部署它。连接是通过 ssh 进行的。
引发错误的函数是 symfony:assets:install,如下所示:
php /var/www/xx/releases/20200415083534/app/console assets:install web --symlink
它抛出以下错误
[InvalidArgumentException]
The target directory "web" does not exist.
正如您所期望的那样,文件夹就在那儿——我的用户是所有者并且拥有它的权利。 如果我转到这个确切的文件夹 /20200415083534 并运行与上面相同的脚本,它会按预期安装资产。
作曲家额外看起来像这样:
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": [
{
"file": "app/config/parameters.yml"
},
{
"file": "app/config/parameters_prod.yml",
"dist-file": "app/config/parameters_prod.yml.dist"
}
],
"branch-alias": {
"dev-master": "2.8.*"
}
}
有什么想法吗?
附:我已经检查过这个 "assets:install" command fails with error "The target directory "web" does not exist", why? 因为它有相同的错误,但情况不同,他的解决方案不适用于我的情况。
【问题讨论】:
-
我认为您需要进入 20200415083534 文件夹才能运行此脚本
-
谁能解释什么是反对票?我有点困惑。
-
我不知道为什么,但你能回答我吗。
-
@GaryHoubre 这似乎不起作用,因为“symfony:assets:install”正在使用该命令 - php /var/www/xx/releases/20200415083534/app/console assets:install web --symlink 之前改目录也没关系。
标签: symfony deployment server composer-php capistrano