You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Resources/public" directory of each bundle will be copied into it.
48
49
49
50
To create a symlink to each bundle instead of copying its assets, use the
50
-
<info>--symlink</info> option:
51
+
<info>--symlink</info> option (will fall back to hard copies when symbolic links aren't possible:
51
52
52
53
<info>php %command.full_name% web --symlink</info>
53
54
@@ -73,17 +74,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
73
74
thrownew \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));
74
75
}
75
76
76
-
if (!function_exists('symlink') && $input->getOption('symlink')) {
77
-
thrownew \InvalidArgumentException('The symlink() function is not available on your system. You need to install the assets without the --symlink option.');
@@ -293,9 +294,12 @@ public function symlink($originDir, $targetDir, $copyOnWindows = false)
293
294
thrownewIOException('Unable to create symlink due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?');
294
295
}
295
296
}
296
-
297
297
thrownewIOException(sprintf('Failed to create symbolic link from "%s" to "%s".', $originDir, $targetDir), 0, null, $targetDir);
298
298
}
299
+
300
+
if (!file_exists($targetDir)) {
301
+
thrownewIOException(sprintf('Symbolic link "%s" is created but appears to be broken.', $targetDir), 0, null, $targetDir);
302
+
}
299
303
}
300
304
}
301
305
@@ -374,7 +378,7 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
374
378
}
375
379
376
380
$copyOnWindows = false;
377
-
if (isset($options['copy_on_windows']) && !function_exists('symlink')) {
0 commit comments