| @@ 60-66 (lines=7) @@ | ||
| 57 | $filePath = $this->getPath() . '/' . $fileRelativePath; |
|
| 58 | ||
| 59 | // file already exists? |
|
| 60 | if ($this->fs->exists($filePath) && !$this->force) { |
|
| 61 | $helper = $this->getHelper('question'); |
|
| 62 | $question = new ConfirmationQuestion(sprintf('This page already exists. Do you want to override it? [y/n]', $this->getpath()), false); |
|
| 63 | if (!$helper->ask($input, $output, $question)) { |
|
| 64 | return; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| 68 | // create new file |
|
| 69 | $title = $this->name; |
|
| @@ 46-52 (lines=7) @@ | ||
| 43 | $this->force = $input->getOption('force'); |
|
| 44 | ||
| 45 | try { |
|
| 46 | if ($this->fs->exists($this->getPath().'/'.self::CONFIG_FILE) && !$this->force) { |
|
| 47 | $helper = $this->getHelper('question'); |
|
| 48 | $question = new ConfirmationQuestion('Website already exists. Do you want to override it? [y/n]', false); |
|
| 49 | if (!$helper->ask($input, $output, $question)) { |
|
| 50 | return; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | $root = __DIR__.'/../../'; |
|
| 54 | if (Plateform::isPhar()) { |
|
| 55 | $root = Plateform::getPharPath().'/'; |
|