Skip to content

Commit feb63df

Browse files
committed
fix script envs
1 parent 14ee7f2 commit feb63df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

provisioner/terraform/executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ func (e *executor) init(ctx, killCtx context.Context, logr logSink) error {
283283
func checksumFileCRC32(ctx context.Context, logger slog.Logger, path string) uint32 {
284284
content, err := os.ReadFile(path)
285285
if err != nil {
286-
logger.Debug(ctx, "file %s does not exist or can't be read, skip checksum calculation")
286+
logger.Debug(ctx, fmt.Sprintf("file %s does not exist or can't be read, skip checksum calculation", path))
287287
return 0
288288
}
289289
return crc32.ChecksumIEEE(content)

provisioner/terraform/provision_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func TestProvision_Cancel(t *testing.T) {
194194
binPath := filepath.Join(dir, "terraform")
195195

196196
// Example: exec /path/to/terrafork_fake_cancel.sh 1.2.1 apply "$@"
197-
content := fmt.Sprintf("#!/bin/sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode)
197+
content := fmt.Sprintf("#!/usr/bin/env sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode)
198198
err := os.WriteFile(binPath, []byte(content), 0o755) //#nosec
199199
require.NoError(t, err)
200200
t.Logf("wrote fake terraform script to %s", binPath)

0 commit comments

Comments
 (0)