From 6cabefd826686a9636200a050829d5aef8c87014 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 02 Apr 2025 03:22:31 +0800 Subject: [PATCH] LMTP: Fix mistake in command arguments --- lmtp_handle_patch.go | 5 ++++- diff --git a/lmtp_handle_patch.go b/lmtp_handle_patch.go index 4e49d555d62e467e6b4ea404ffbe0a330fbd756f..138b5927e593e37b48d29075aa4f229fe30b7c84 100644 --- a/lmtp_handle_patch.go +++ b/lmtp_handle_patch.go @@ -63,11 +63,14 @@ sourceBuf := bytes.NewReader(stringToBytes(sourceString)) if err = gitdiff.Apply(&patchedBuf, sourceBuf, diffFile); err != nil { return err } - proc := exec.CommandContext(session.ctx, "git", "hash-object", "w", "-t", "blob", "--stdin") + proc := exec.CommandContext(session.ctx, "git", "hash-object", "-w", "-t", "blob", "--stdin") proc.Env = append(os.Environ(), "GIT_DIR="+fsPath) proc.Stdout = &hashBuf proc.Stdin = &patchedBuf if err = proc.Start(); err != nil { + return err + } + if err = proc.Wait(); err != nil { return err } newHash := hashBuf.Bytes() -- 2.48.1