Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/Command/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io = new SymfonyStyle($input, $output);

try {
$path = $input->getArgument('archive');
if (!file_exists($path)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work with S3 as primary storage?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a local zip file that we are importing from.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

occ user:import /path/to/my/file.zip

$io->error("File {$path} could not be found");
$io->writeln('aborted.');
return self::FAILURE;
}
$uid = $input->getOption('user');
if (!empty($uid)) {
$user = $this->userManager->get($uid);
Expand All @@ -64,7 +70,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
} else {
$user = null;
}
$path = $input->getArgument('archive');
$io->writeln("Importing from {$path}…");
$importSource = new ImportSource($path);
$this->migrationService->import($importSource, $user, $io);
Expand Down