-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
legacy:assets_install should not delete non empty folders unless asked to #112
Conversation
…s unless asked to with force
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from some minor nitpicks, 👍
$output->writeln(<<<EOT | ||
Skipping: The folder "$targetDir" already exists and seems to contain content! | ||
|
||
Make sure to backup this content and move it into corresponding legacy folder which is will be setup to symlink / copy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which will be setup
@@ -28,7 +28,7 @@ protected function configure() | |||
) | |||
) | |||
->addOption('create', 'c', InputOption::VALUE_NONE, 'Create "src" directory structure if it does not exist') | |||
->addOption('force', 'f', InputOption::VALUE_NONE, 'Symlink folders even if target already exist') | |||
->addOption('force', null, InputOption::VALUE_NONE, 'Force symlinking folders even if target already exist') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if target already exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming you have checked that it doesn't count .
and ..
as folder content :)
|
||
foreach (array('design', 'extension', 'share', 'var') as $folder) { | ||
$targetDir = "$targetArg/$folder"; | ||
$originDir = "$legacyRootDir/$folder"; | ||
|
||
// Check if directory exists (not link) and is not empty to avoid removing things that should be backend up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backed up
Make sure to backup this content and move it into corresponding legacy folder which is will be setup to symlink / copy | ||
to this folder before you remove it, then re-run this command. | ||
|
||
If this folder and the other "$targetArg" directories can be safely overwritten, run this command with <info>--force</info> option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command with the
from comments and doc it does not include those, it also does not include hidden folders ( |
Thanks for the reviews, sorry if the only things to comment on is grammar as always :P |
I have a problem with this: |
@blankse So you are referring to setup that has already been used running platform, and then you add legacy bridge? or during install of both? |
During install of both. If the symlink already exists everything works fine. |
Fixes #110