Skip to content

Commit 6abfd9a

Browse files
Add self-deletion mechanism for one-time use script
1 parent 184b113 commit 6abfd9a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/rename-plugin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
129129
'Run: <info>composer install</info> (to refresh autoload)',
130130
'Run: <info>make init database-init load-fixtures</info> (if using Docker)',
131131
]);
132+
133+
if (unlink(__FILE__)) {
134+
$io->note('This script has been deleted (one-time use only).');
135+
}
132136
}
133137

134138
return Command::SUCCESS;

0 commit comments

Comments
 (0)