Skip to content

Commit

Permalink
feat: link can be permanent
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Aug 19, 2024
1 parent 777f8c0 commit 670cff5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Command/LinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected function configure(): void
->setDefinition([
new InputArgument('path', InputArgument::OPTIONAL, 'Path to link.'),
new InputOption('working-directory', 'wd', InputOption::VALUE_REQUIRED, "Defaults to SERVER['PWD']"),
new InputOption('permanent', 'p', InputOption::VALUE_NONE, "Permanent composer change, does not revert backups."),
]);
}

Expand Down Expand Up @@ -127,6 +128,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
} catch (\Exception $e) {
}

var_dump($input->getOption('permanent'));
if ($input->getOption('permanent')) {
return 0;
}

foreach ($revert as $file => $backup) {
rename($backup, $file);
}
Expand Down

0 comments on commit 670cff5

Please sign in to comment.