mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: fix provisioner scripts shebang for nix users (#21066)
This commit is contained in:
@@ -156,7 +156,7 @@ func TestProvision_Cancel(t *testing.T) {
|
||||
binPath := filepath.Join(dir, "terraform")
|
||||
|
||||
// Example: exec /path/to/terrafork_fake_cancel.sh 1.2.1 apply "$@"
|
||||
content := fmt.Sprintf("#!/bin/sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode)
|
||||
content := fmt.Sprintf("#!/usr/bin/env sh\nexec %q %s %s \"$@\"\n", fakeBin, terraform.TerraformVersion.String(), tt.mode)
|
||||
err := os.WriteFile(binPath, []byte(content), 0o755) //#nosec
|
||||
require.NoError(t, err)
|
||||
t.Logf("wrote fake terraform script to %s", binPath)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
VERSION=$1
|
||||
MODE=$2
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
VERSION=$1
|
||||
shift 1
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
VERSION=$1
|
||||
shift 1
|
||||
|
||||
Reference in New Issue
Block a user