Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef089be

Browse files
committed
safe assign
1 parent9c1bf01 commitef089be

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎agent/agentcontainers/devcontainer.go‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,16 @@ func devcontainerStartupScript(dc codersdk.WorkspaceAgentDevcontainer, script co
6464
}
6565

6666
funcexpandDevcontainerPaths(logger slog.Logger,expandPathfunc(string) (string,error),dc codersdk.WorkspaceAgentDevcontainer) codersdk.WorkspaceAgentDevcontainer {
67-
varerrerror
68-
ifdc.WorkspaceFolder,err=expandPath(dc.WorkspaceFolder);err!=nil {
67+
ifwf,err:=expandPath(dc.WorkspaceFolder);err!=nil {
6968
logger.Warn(context.Background(),"expand devcontainer workspace folder failed",slog.Error(err))
69+
}else {
70+
dc.WorkspaceFolder=wf
7071
}
7172
ifdc.ConfigPath!="" {
72-
ifdc.ConfigPath,err=expandPath(dc.ConfigPath);err!=nil {
73+
ifcp,err:=expandPath(dc.ConfigPath);err!=nil {
7374
logger.Warn(context.Background(),"expand devcontainer config path failed",slog.Error(err))
75+
}else {
76+
dc.ConfigPath=cp
7477
}
7578
}
7679
returndc

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp