From 37b33c53269b9087053ecd7f0484d3a04e018a05 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 29 May 2024 10:54:08 -0400 Subject: [PATCH] packer_test: remove %d from workdir path '%d' gets output as-is in the temporary workdir we create. This is unnecessary and could even be problematic in some cases, so we scrub it from the MkdirTemp call. --- packer_test/plugin_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_test/plugin_test.go b/packer_test/plugin_test.go index b3be0339b..a2e1b4aff 100644 --- a/packer_test/plugin_test.go +++ b/packer_test/plugin_test.go @@ -276,7 +276,7 @@ func WriteFile(t *testing.T, dest string, content string) { // If any file cannot be found, this function will fail func TempWorkdir(t *testing.T, files ...string) (string, func()) { var err error - tempDir, err := os.MkdirTemp("", "packer-test-workdir-%d") + tempDir, err := os.MkdirTemp("", "packer-test-workdir-") if err != nil { t.Fatalf("failed to create temporary working directory: %s", err) }