From a6e0dc6396f4489a4939289f2c253ff187093e91 Mon Sep 17 00:00:00 2001 From: TickTackk Date: Sat, 14 Apr 2018 00:51:47 +0530 Subject: [PATCH] GitException if no custom section is available in config file --- .../DeveloperTools/Cli/Command/Git/Commit.php | 14 +++++++++++--- .../_output/templates/_metadata.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/upload/src/addons/TickTackk/DeveloperTools/Cli/Command/Git/Commit.php b/upload/src/addons/TickTackk/DeveloperTools/Cli/Command/Git/Commit.php index 759c9c2d..f275871f 100644 --- a/upload/src/addons/TickTackk/DeveloperTools/Cli/Command/Git/Commit.php +++ b/upload/src/addons/TickTackk/DeveloperTools/Cli/Command/Git/Commit.php @@ -9,6 +9,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\Question; +use TickTackk\DeveloperTools\Git\GitException; use TickTackk\DeveloperTools\Git\GitRepository; use XF\Cli\Command\AddOnActionTrait; use XF\Util\File; @@ -92,11 +93,18 @@ protected function execute(InputInterface $input, OutputInterface $output) File::writeFile($repoRoot . $ds . '.gitignore', $globalGitIgnore, false); } - $customSubDir = $git->config()->get('custom.subdir')->execute(); - if (!empty($customSubDir)) + try { - $repoRoot .= ($ds . $customSubDir); + $customSubDir = $git->config()->get('custom.subdir')->execute(); + if (!empty($customSubDir)) + { + $repoRoot .= ($ds . $customSubDir); + } } + catch (GitException $e) + { + } + $uploadDirectory = $repoRoot . $ds . 'upload'; if (is_dir($repoRoot)) diff --git a/upload/src/addons/TickTackk/DeveloperTools/_output/templates/_metadata.json b/upload/src/addons/TickTackk/DeveloperTools/_output/templates/_metadata.json index 924eba69..9878df01 100755 --- a/upload/src/addons/TickTackk/DeveloperTools/_output/templates/_metadata.json +++ b/upload/src/addons/TickTackk/DeveloperTools/_output/templates/_metadata.json @@ -2,7 +2,7 @@ "admin/developerTools_developer_options.html": { "version_id": 1000031, "version_string": "1.0.0 Beta 1", - "hash": "d1cdb294e23965d662ad5cf39bc54682" + "hash": "cfe751e70061c56e1b5ddf3ede0f2128" }, "admin/developerTools_template_modification_edit_style_id.html": { "version_id": 1000012,