Skip to content

Commit e61bd26

Browse files
committed
Fix apply dev flag
1 parent 4fa05f6 commit e61bd26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/server/apply.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
APP = "app"
3030
)
3131

32-
func (s *Server) loadApplyInfo(fileName string, data []byte, branch string, dev bool) ([]*types.CreateAppRequest, error) {
32+
func (s *Server) loadApplyInfo(fileName string, data []byte, branch string, applyDev bool) ([]*types.CreateAppRequest, error) {
3333
appDefs := make([]*starlarkstruct.Struct, 0)
3434

3535
createAppBuiltin := func(_ *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
@@ -53,7 +53,7 @@ func (s *Server) loadApplyInfo(fileName string, data []byte, branch string, dev
5353
fields := starlark.StringDict{
5454
"path": path,
5555
"source": source,
56-
"dev": dev,
56+
"dev": cmp.Or(dev, starlark.Bool(applyDev)),
5757
"auth": auth,
5858
"git_auth": gitAuth,
5959
"git_branch": gitBranch,
@@ -82,7 +82,7 @@ func (s *Server) loadApplyInfo(fileName string, data []byte, branch string, dev
8282
}
8383

8484
thread.SetLocal(types.TL_BRANCH, branch)
85-
thread.SetLocal(types.TL_DEV, dev)
85+
thread.SetLocal(types.TL_DEV, applyDev)
8686

8787
options := syntax.FileOptions{}
8888
_, err := starlark.ExecFileOptions(&options, thread, fileName, data, builtins)

0 commit comments

Comments
 (0)