Skip to content

Commit c3c059f

Browse files
authored
chore: fix provisioner scripts shebang for nix users (#21066)
1 parent ff46917 commit c3c059f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

provisioner/terraform/provision_test.go

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

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

provisioner/terraform/testdata/fake_cancel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
VERSION=$1
44
MODE=$2

provisioner/terraform/testdata/fake_cancel_hang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
VERSION=$1
44
shift 1

provisioner/terraform/testdata/fake_text_file_busy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
VERSION=$1
44
shift 1

0 commit comments

Comments
 (0)