From ad5bf97378d276129b118755e910e202de421ca0 Mon Sep 17 00:00:00 2001 From: Michal Vrchota Date: Fri, 2 Feb 2024 13:31:51 +0100 Subject: [PATCH] Use sys_get_temp_dir() as default cache dir (#78) --- CHANGELOG.md | 5 +++++ src/Command/YamlCommand.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d65361c..5fe4dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # Changelog ## [Unreleased] +### Changed +- [#78] Use system temp dir as default cache dir instead of root of project, Thanks to [@techi602] ## [8.0.1] +### Fixed - [#76] Files path service: only use GLOB_BRACE when available ## [8.0.0] - 2023-02-26 @@ -239,11 +242,13 @@ patchesJson6902: - create base command to check yaml sort - create `--diff` mode +[@techi602]: https://github.com/techi602 [@ChrisDBrown]: https://github.com/ChrisDBrown [@boris-brtan]: https://github.com/boris-brtan [@DavidOstrozlik]: https://github.com/DavidOstrozlik [@PetrHeinz]: https://github.com/PetrHeinz +[#78]: https://github.com/sspooky13/yaml-standards/pull/78 [#76]: https://github.com/sspooky13/yaml-standards/issues/76 [#72]: https://github.com/sspooky13/yaml-standards/issues/72 [#71]: https://github.com/sspooky13/yaml-standards/issues/71 diff --git a/src/Command/YamlCommand.php b/src/Command/YamlCommand.php index 538c20c..86a458f 100644 --- a/src/Command/YamlCommand.php +++ b/src/Command/YamlCommand.php @@ -35,7 +35,7 @@ protected function configure(): void ->setDescription('Check yaml files respect standards') ->addArgument(self::ARGUMENT_PATH_TO_CONFIG_FILE, InputArgument::OPTIONAL, 'Path to configuration file. By default configuration file is looking in root directory', './yaml-standards.yaml') ->addOption(self::OPTION_FIX, null, InputOption::VALUE_NONE, 'Automatically fix problems') - ->addOption(self::OPTION_PATH_TO_CACHE_DIR, null, InputOption::VALUE_REQUIRED, 'Custom path to cache dir', '/') + ->addOption(self::OPTION_PATH_TO_CACHE_DIR, null, InputOption::VALUE_REQUIRED, 'Custom path to cache dir', sys_get_temp_dir() . '/') ->addOption(self::OPTION_DISABLE_CACHE, null, InputOption::VALUE_NONE, 'Disable cache functionality'); }