Compare commits

..
Author SHA1 Message Date
Robby Russell b20d95c390 fix(gh): preserve valid completion cache on failure 2026-09-26 19:00:22 -05:00
4 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ dependencies:
plugins/gradle:
repo: gradle/gradle-completion
branch: master
version: 05693a01fcb246bc4e8fc32a8d561dc537aaedf2
version: e7c881dbef7462bc35ad05328397e1582fe25cb8
precopy: |
set -e
find . ! -name _gradle ! -name LICENSE -delete
+2
View File
@@ -18,3 +18,5 @@ plugin is loaded, which is usually when you start up a new terminal emulator.
The cache is stored at:
- `$ZSH_CACHE_DIR/completions/_gh` completions script
If an update fails, the last successfully generated completion script is kept.
+8 -2
View File
@@ -13,6 +13,12 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_gh"
zf_mv -f -- =( gh completion --shell zsh ) "$TMPPREFIX"
local completion_file="$ZSH_CACHE_DIR/completions/_gh"
local completion_tmp="${completion_file}.$$.${RANDOM}"
if gh completion --shell zsh >| "$completion_tmp" && [[ -s "$completion_tmp" ]]; then
zf_mv -f -- "$completion_tmp" "$completion_file"
fi
command rm -f -- "$completion_tmp"
} &|
-4
View File
@@ -267,7 +267,6 @@ __gradle_subcommand() {
'-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:org.gradle.configuration cache.problems:(fail warn)' \
'-Dorg.gradle.configuration-cache.read-only=[]' \
'-Dorg.gradle.configuration-cache.unsafe.ignore.unsupported-build-events-listeners=[]' \
'-Dorg.gradle.configuration-cache.unsafe.skip-task-logging-listeners-serialization=[]' \
'-Dorg.gradle.configuration-cache=[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]' \
'-Dorg.gradle.configureondemand=[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]' \
'-Dorg.gradle.console.interactive=[]' \
@@ -297,7 +296,6 @@ __gradle_subcommand() {
'-Dorg.gradle.jvmargs=[]' \
'-Dorg.gradle.logging.level=[]:org.gradle.logging.level:(quiet warn info debug)' \
'-Dorg.gradle.logging.stacktrace=[]' \
'-Dorg.gradle.mirror.maven.settings=[]' \
'-Dorg.gradle.native=[]' \
'-Dorg.gradle.parallel=[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false)' \
'-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:org.gradle.priority:(normal low)' \
@@ -409,7 +407,6 @@ _gradle() {
'-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:org.gradle.configuration cache.problems:(fail warn):->argument-expected' \
'-Dorg.gradle.configuration-cache.read-only=[]:->argument-expected' \
'-Dorg.gradle.configuration-cache.unsafe.ignore.unsupported-build-events-listeners=[]:->argument-expected' \
'-Dorg.gradle.configuration-cache.unsafe.skip-task-logging-listeners-serialization=[]:->argument-expected' \
'-Dorg.gradle.configuration-cache=[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]:->argument-expected' \
'-Dorg.gradle.configureondemand=[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]:->argument-expected' \
'-Dorg.gradle.console.interactive=[]:->argument-expected' \
@@ -439,7 +436,6 @@ _gradle() {
'-Dorg.gradle.jvmargs=[]:->argument-expected' \
'-Dorg.gradle.logging.level=[]:org.gradle.logging.level:(quiet warn info debug):->argument-expected' \
'-Dorg.gradle.logging.stacktrace=[]:->argument-expected' \
'-Dorg.gradle.mirror.maven.settings=[]:->argument-expected' \
'-Dorg.gradle.native=[]:->argument-expected' \
'-Dorg.gradle.parallel=[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false):->argument-expected' \
'-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:org.gradle.priority:(normal low):->argument-expected' \