From 2ac723525b4ebb1754838241626df9333f55f5ca Mon Sep 17 00:00:00 2001 From: Tiago Ilieve Date: Sat, 2 Nov 2024 00:52:39 -0300 Subject: [PATCH] Preserve binary access/modification time --- tools/tools.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/tools.go b/tools/tools.go index 6331711..19cb8e5 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -109,6 +109,11 @@ func (t *Tool) Extract() error { return fmt.Errorf("saveBinary: %w", err) } + err = os.Chtimes(t.Asset.Destination, hdr.AccessTime, hdr.ModTime) + if err != nil { + return fmt.Errorf("os.Chtimes: %w", err) + } + found = true break