From 92a3c2ae17526f7759c59b69cfbd960473d2ff29 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 9 Feb 2026 10:41:14 +0800 Subject: [PATCH] fix: Try to fix workflow error for Nu 0.111 (#197) * fix: Try to fix workflow error for Nu 0.111 * chore: Update readme --- README.md | 2 -- README.zh-CN.md | 2 -- cspell.yml | 1 + nu/common.nu | 7 ++++--- nu/release.nu | 6 +++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c66e063..3a7c981 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ [中文说明](README.zh-CN.md) -`deepseek-review` offers seamless integration with DeepSeek models on SiliconCloud. [Sign Up Now](https://cloud.siliconflow.cn/i/rqCdIxzS) to **claim your free 20 million tokens** and start exploring its capabilities! - ## Features ### GitHub Action diff --git a/README.zh-CN.md b/README.zh-CN.md index e9c0054..561052c 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -5,8 +5,6 @@ ![Failed](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgist.githubusercontent.com%2Fhustcer%2Fb99391ee59016b17d0befe3331387e89%2Fraw%2Ftest-summary.json&query=%24.failed&label=Failed&color=red) ![Skipped](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgist.githubusercontent.com%2Fhustcer%2Fb99391ee59016b17d0befe3331387e89%2Fraw%2Ftest-summary.json&query=%24.skipped&label=Skipped&color=yellow) -本工具也支持使用 SiliconCloud 上的 DeepSeek 模型,[注册](https://cloud.siliconflow.cn/i/rqCdIxzS) 就**免费赠送 2000 万 Token**,赶紧试试吧! - ## 特性 ### GitHub Action diff --git a/cspell.yml b/cspell.yml index 50000e2..a062f0b 100644 --- a/cspell.yml +++ b/cspell.yml @@ -20,6 +20,7 @@ words: - hustcer - Nushell - creatio +- pipefail - justfile - lefthook - deepseek diff --git a/nu/common.nu b/nu/common.nu index 9ff11d2..b61c184 100644 --- a/nu/common.nu +++ b/nu/common.nu @@ -193,7 +193,8 @@ export def git-check [ # Check if current directory is a git repo export def is-repo [] { let checkRepo = try { - do -i { git rev-parse --is-inside-work-tree } | complete + # Put `complete` inside `do` block to avoid pipefail error in Nushell 0.110+ + do { git rev-parse --is-inside-work-tree | complete } } catch { ({ stdout: 'false' }) } @@ -205,8 +206,8 @@ export def has-ref [ ref: string # The git ref to check ] { if not (is-repo) { return false } - # Brackets were required here, or error will occur - let parse = (do -i { git rev-parse --verify -q $ref } | complete) + # Put `complete` inside `do` block to avoid pipefail error in Nushell 0.110+ + let parse = (do { git rev-parse --verify -q $ref | complete }) if ($parse.stdout | is-empty) { false } else { true } } diff --git a/nu/release.nu b/nu/release.nu index b99ac31..9c32139 100644 --- a/nu/release.nu +++ b/nu/release.nu @@ -46,9 +46,9 @@ export def 'make-release' [ export def has-ref [ ref: string # The git ref to check ] { - let checkRepo = (do -i { git rev-parse --is-inside-work-tree } | complete) + # Put `complete` inside `do` block to avoid pipefail error in Nushell 0.110+ + let checkRepo = (do { git rev-parse --is-inside-work-tree | complete }) if not ($checkRepo.stdout =~ 'true') { return false } - # Brackets were required here, or error will occur - let parse = (do -i { git rev-parse --verify -q $ref } | complete) + let parse = (do { git rev-parse --verify -q $ref | complete }) if ($parse.stdout | is-empty) { false } else { true } }