$destination_theme =
$input->
getArgument('machine-name'
);
$default_destination = 'themes';
$destination =
trim($input->
getOption('path'
) ?:
$default_destination, '/'
) . '/' .
$destination_theme;
if (is_dir($destination)) { $io->
getErrorStyle()->
error("Theme could not be generated because the destination directory
$destination exists already."
);
return 1;
} // Source directory for the theme.
$source_theme_name =
$input->
getOption('starterkit'
);
if (!
$source_theme =
$this->
getThemeInfo($source_theme_name)) { $io->
getErrorStyle()->
error("Theme source theme
$source_theme_name cannot be found."
);
return 1;
} if (!
$this->
isStarterkitTheme($source_theme)) { $io->
getErrorStyle()->
error("Theme source theme
$source_theme_name is not a valid starter kit."
);
return 1;
} $source =
$source_theme->
getPath();