initialiseGit(); $wasRunning = false; if ((new Tmux())->isRunning() === true) { $wasRunning = true; $this->call('tmux-ui:stop', ['--kill' => true]); } $this->info('Getting changes from Github'); $result = $this->git->gitPull(); $this->info($result[0]); if ($wasRunning === true) { $this->call('tmux-ui:start'); } } /** * @throws \Cz\Git\GitException */ protected function initialiseGit() { if (! ($this->git instanceof Git)) { $this->git = new Git(); } } }