Skip to content

Commit 7fe69cd

Browse files
committed
Drop deprecated coder_agent.dir; pass cwd to web-shell via URL param
1 parent 0569a4d commit 7fe69cd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ data "coder_workspace_owner" "me" {}
150150
resource "coder_agent" "main" {
151151
arch = data.coder_provisioner.me.arch
152152
os = "linux"
153-
dir = data.coder_parameter.directory.value
154153

155154
# Workspace identity is exposed to shells and coder_script blocks so
156155
# home-persist-resolve can scope per-workspace paths under
@@ -251,7 +250,7 @@ resource "coder_app" "web-shell" {
251250
agent_id = coder_agent.main.id
252251
slug = "web-shell"
253252
display_name = "web-shell"
254-
url = "http://localhost:4000"
253+
url = "http://localhost:4000/?cwd=${urlencode(data.coder_parameter.directory.value)}"
255254
icon = "/icon/terminal.svg"
256255
subdomain = true
257256
share = "owner"

0 commit comments

Comments
 (0)