protected function execute(InputInterface $input, OutputInterface $output) { $this->setupEnvironment($input); $message = $this->env->isTemporary() ? 'Preparing ' . tinkr_version() . '...' : 'Preparing ' . tinkr_version() . ' at `' . $this->env->getPath() . '`...'; $output->writeln('<info>' . $message . '</info>'); tinkr('composer')->init($input->getArgument('initPackages')); tinkr('shell')->run(); if ($this->env->isTemporary()) { $output->writeln('<info>Cleaning up temporary tinkr environment...</info>'); } }
public function __construct(Environment $env) { $this->oldWorkingDir = getcwd(); chdir($env->getPath()); $this->psy = new PsyShell($env->getPsyShConfiguration()); $this->psy->setAutoExit(false); $this->psy->add(new Load()); $this->psy->add(new Export()); $this->psy->add(new PWD()); $this->env = $env; }
public function __construct(Environment $env) { $this->config = $env->getComposerConfiguration(); }