From 19519a0a1302a599b32ae0b76de0462b0746afea Mon Sep 17 00:00:00 2001 From: DevCats Date: Thu, 23 Oct 2025 07:39:27 -0500 Subject: [PATCH] fix: add shebang to zed coder_script (#504) ## Description Add `#!/bin/sh` to zed_settings coder_script ## Type of Change - [ ] New module - [ ] New template - [X] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information **Path:** `registry/coder/modules/zed` **New version:** `v1.1.1` **Breaking change:** [ ] Yes [X] No ## Testing & Validation - [X] Tests pass (`bun test`) - [X] Code formatted (`bun fmt`) - [X] Changes tested locally ## Related Issues https://github.com/coder/registry/issues/482 --- registry/coder/modules/zed/README.md | 10 +++++----- registry/coder/modules/zed/main.tf | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/registry/coder/modules/zed/README.md b/registry/coder/modules/zed/README.md index 989df54d..132e489c 100644 --- a/registry/coder/modules/zed/README.md +++ b/registry/coder/modules/zed/README.md @@ -19,7 +19,7 @@ Zed is a high-performance, multiplayer code editor from the creators of Atom and module "zed" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/zed/coder" - version = "1.1.0" + version = "1.1.1" agent_id = coder_agent.example.id } ``` @@ -32,7 +32,7 @@ module "zed" { module "zed" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/zed/coder" - version = "1.1.0" + version = "1.1.1" agent_id = coder_agent.example.id folder = "/home/coder/project" } @@ -44,7 +44,7 @@ module "zed" { module "zed" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/zed/coder" - version = "1.1.0" + version = "1.1.1" agent_id = coder_agent.example.id display_name = "Zed Editor" order = 1 @@ -57,7 +57,7 @@ module "zed" { module "zed" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/zed/coder" - version = "1.1.0" + version = "1.1.1" agent_id = coder_agent.example.id agent_name = coder_agent.example.name } @@ -73,7 +73,7 @@ You can declaratively set/merge settings with the `settings` input. Provide a JS module "zed" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/zed/coder" - version = "1.1.0" + version = "1.1.1" agent_id = coder_agent.example.id settings = jsonencode({ diff --git a/registry/coder/modules/zed/main.tf b/registry/coder/modules/zed/main.tf index 94ec69a6..0029672a 100644 --- a/registry/coder/modules/zed/main.tf +++ b/registry/coder/modules/zed/main.tf @@ -73,6 +73,7 @@ resource "coder_script" "zed_settings" { icon = "/icon/zed.svg" run_on_start = true script = <<-EOT + #!/bin/sh set -eu SETTINGS_JSON='${replace(var.settings, "\"", "\\\"")}' if [ -z "$${SETTINGS_JSON}" ] || [ "$${SETTINGS_JSON}" = "{}" ]; then