/**
  * @return bool|null
  * @throws \App\Satis\Exceptions\PackageBuildFailedException
  */
 public function build()
 {
     $this->configPersister->lock($this->buildContext->getItemId());
     $command = new BuildCommand($this->buildContext->getConfigFile(), config('satis.build_directory') . DIRECTORY_SEPARATOR . $this->buildContext->getBuildDirectory(), config('satis.proxy'));
     $command->setItem($this->buildContext->getItemName());
     $output = null;
     try {
         $output = $command->withCd(base_path())->run($this->asyncMode);
     } catch (PackageBuildFailedException $e) {
         $output = $e->getMessage();
     } finally {
         if ($this->asyncMode === false) {
             $this->configPersister->unlock($this->buildContext->getItemId());
         }
     }
     return $output;
 }
 /**
  * @return string
  */
 public function save()
 {
     $satisConfig = $this->serializer->serialize($this->satis, 'json');
     $this->configPersister->updateWith($satisConfig);
     if ($this->disableBuild === false) {
         return $this->configBuilder->build();
     }
     return true;
 }
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     $this->info('Unlocking UI.');
     $this->configPersister->unlock();
 }