core icon indicating copy to clipboard operation
core copied to clipboard

The target directory "/......./public" does not exist.

Open simongroenewolt opened this issue 4 years ago • 1 comments

The pre/post install commands run the assets:install command multiple (?) times.

Most of these look like this:

php bin/console assets:install --symlink --relative public --ansi

The public attribute in that command makes it expliclitly target a directory named public in your project.

In Symfony projects it is possible to specify an alternative directory as public directory by specifying extra.public-dir in composer.json. At the moment the assets:install commands fail if anything other than the default public dir is in use.

It looks like this could have a really easy fix by removing the explicit 'public' in these commands, because in that case Symfony will fall back to determining the public dir itself, using the option to override it. (See https://github.com/symfony/framework-bundle/blob/43af5d646b4f5e76cf5635332c74c8ee84dfd492/Command/AssetsInstallCommand.php#L102)

simongroenewolt avatar May 11 '21 10:05 simongroenewolt

Interesting.. Might be worthwhile to look into, like you say!

bobdenotter avatar May 13 '21 07:05 bobdenotter