src/Command/NewSite.php 1 location
|
@@ 48-54 (lines=7) @@
|
| 45 |
|
$force = $input->getOption('force'); |
| 46 |
|
|
| 47 |
|
try { |
| 48 |
|
if ($this->fs->exists($this->getPath().'/'.self::CONFIG_FILE) && !$force) { |
| 49 |
|
$helper = $this->getHelper('question'); |
| 50 |
|
$question = new ConfirmationQuestion( |
| 51 |
|
'Website already exists. Do you want to override it? [y/n]', |
| 52 |
|
false |
| 53 |
|
); |
| 54 |
|
if (!$helper->ask($input, $output, $question)) { |
| 55 |
|
return; |
| 56 |
|
} |
| 57 |
|
} |
src/Command/NewPage.php 1 location
|
@@ 76-82 (lines=7) @@
|
| 73 |
|
$filePath = $this->getPath() . '/' . $fileRelativePath; |
| 74 |
|
|
| 75 |
|
// file already exists? |
| 76 |
|
if ($this->fs->exists($filePath) && !$force) { |
| 77 |
|
$helper = $this->getHelper('question'); |
| 78 |
|
$question = new ConfirmationQuestion( |
| 79 |
|
sprintf('This page already exists. Do you want to override it? [y/n]', $this->getpath()), |
| 80 |
|
false |
| 81 |
|
); |
| 82 |
|
if (!$helper->ask($input, $output, $question)) { |
| 83 |
|
return; |
| 84 |
|
} |
| 85 |
|
} |