fix: add shebang to zed coder_script (#504)
## Description Add `#!/bin/sh` to zed_settings coder_script <!-- Briefly describe what this PR does and why --> ## Type of Change - [ ] New module - [ ] New template - [X] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information <!-- Delete this section if not applicable --> **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 <!-- Link related issues or write "None" if not applicable -->
This commit is contained in:
parent
63e42283ce
commit
19519a0a13
@ -19,7 +19,7 @@ Zed is a high-performance, multiplayer code editor from the creators of Atom and
|
|||||||
module "zed" {
|
module "zed" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/zed/coder"
|
source = "registry.coder.com/coder/zed/coder"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -32,7 +32,7 @@ module "zed" {
|
|||||||
module "zed" {
|
module "zed" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/zed/coder"
|
source = "registry.coder.com/coder/zed/coder"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ module "zed" {
|
|||||||
module "zed" {
|
module "zed" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/zed/coder"
|
source = "registry.coder.com/coder/zed/coder"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
display_name = "Zed Editor"
|
display_name = "Zed Editor"
|
||||||
order = 1
|
order = 1
|
||||||
@ -57,7 +57,7 @@ module "zed" {
|
|||||||
module "zed" {
|
module "zed" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/zed/coder"
|
source = "registry.coder.com/coder/zed/coder"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
agent_name = coder_agent.example.name
|
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" {
|
module "zed" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/zed/coder"
|
source = "registry.coder.com/coder/zed/coder"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
|
|
||||||
settings = jsonencode({
|
settings = jsonencode({
|
||||||
|
|||||||
@ -73,6 +73,7 @@ resource "coder_script" "zed_settings" {
|
|||||||
icon = "/icon/zed.svg"
|
icon = "/icon/zed.svg"
|
||||||
run_on_start = true
|
run_on_start = true
|
||||||
script = <<-EOT
|
script = <<-EOT
|
||||||
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
SETTINGS_JSON='${replace(var.settings, "\"", "\\\"")}'
|
SETTINGS_JSON='${replace(var.settings, "\"", "\\\"")}'
|
||||||
if [ -z "$${SETTINGS_JSON}" ] || [ "$${SETTINGS_JSON}" = "{}" ]; then
|
if [ -z "$${SETTINGS_JSON}" ] || [ "$${SETTINGS_JSON}" = "{}" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user