Skip to content

Commit c6ee8fb

Browse files
fix: can't use return value of sh()
1 parent 253672b commit c6ee8fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/set-git-branch-main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81613,7 +81613,7 @@ async function main(input) {
8161381613
.filter(r => r);
8161481614
for (const path of cargoPaths) {
8161581615
await _cargo__WEBPACK_IMPORTED_MODULE_4__/* .setGitBranch */ .B0(path, input.depsRegExp, input.depsGitUrl, input.depsBranch);
81616-
if ((0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git diff --quiet", { cwd: repo })) {
81616+
if ((0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git diff", { cwd: repo, check: false })) {
8161781617
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git add .", { cwd: repo });
8161881618
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git commit --message 'chore: Update git/branch ${path}/Cargo.toml'`, { cwd: repo, env: _config__WEBPACK_IMPORTED_MODULE_5__/* .gitEnv */ .B });
8161981619
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`cargo check --manifest-path ${path}/Cargo.toml`);

src/set-git-branch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function main(input: Input) {
5656

5757
for (const path of cargoPaths) {
5858
await cargo.setGitBranch(path, input.depsRegExp, input.depsGitUrl, input.depsBranch);
59-
if (sh("git diff --quiet", { cwd: repo })) {
59+
if (sh("git diff", { cwd: repo, check: false })) {
6060
sh("git add .", { cwd: repo });
6161
sh(`git commit --message 'chore: Update git/branch ${path}/Cargo.toml'`, { cwd: repo, env: gitEnv });
6262

0 commit comments

Comments
 (0)