diff --git a/app/Console/Commands/CompileNinjaSvgCommand.php b/app/Console/Commands/CompileNinjaSvgCommand.php index 4dc034d..c2e7291 100644 --- a/app/Console/Commands/CompileNinjaSvgCommand.php +++ b/app/Console/Commands/CompileNinjaSvgCommand.php @@ -41,6 +41,12 @@ public function handle() return Command::INVALID; } + if ($this->option('force') === false && $inscription->fullSvgExists()) { + $this->error('SVG already exists for '.$inscription->name.'. Use --force to overwrite it.'); + + return Command::FAILURE; + } + CompileNinjaSvg::dispatchSync($inscription, $this->option('force')); $this->info($inscription->name.' compiled into a SVG file successfully!');