public function promptForProjectDir()

in src/Utils/WordPress/Project.php [72:93]


    public function promptForProjectDir()
    {
        $dir = $this->input->getOption('dir');
        if ($dir === self::DEFAULT_DIR) {
            $q = new Question(
                'Please enter a directory path for the new project '
                . "(defaults to $dir):",
                $dir
            );
            $dir = $this->ask($q);
        }

        $q = new ConfirmationQuestion(
            "We will use the directory: <info>$dir</info>. If the directory "
            . 'exists, we will overwrite the contents. Do you want to '
            . 'continue? (Y/n)'
        );
        if (!$this->ask($q)) {
            throw new Exception('Operation canceled.');
        }
        return $this->validateProjectDir($dir);
    }