Skip to content

Commit

Permalink
refactor(zbpack): Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Oct 18, 2024
1 parent c73c447 commit f4a2afc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/nodejs/nextjs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func buildMiddleware(workdir, zeaburOutputDir string) error {
Loader: map[string]esbuild.Loader{".wasm": esbuild.LoaderBinary},
AbsWorkingDir: workdir,
})
if res.Errors != nil && len(res.Errors) > 0 {
if len(res.Errors) > 0 {
println(res.Errors[0].Text)
return fmt.Errorf("esbuild run failed")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/nodejs/remix/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TransformServerless(workdir string) error {
funcConfig := types.ZeaburOutputFunctionConfig{Runtime: "node20", Entry: entry}
err = funcConfig.WriteTo(path.Join(zeaburOutputDir, "functions/index.func"))
if err != nil {
return fmt.Errorf("Failed to write function config to \".zeabur/output/functions/index.func\": " + err.Error())
return fmt.Errorf("Failed to write function config to \".zeabur/output/functions/index.func\": %s", err)
}

fmt.Println("=> Copying node_modules")
Expand Down
2 changes: 1 addition & 1 deletion pkg/zeaburpack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ func Build(opt *BuildOptions) error {
if m["outputDir"] != "" || (t == types.PlanTypeStatic && m["serverless"] == "true") {
opt.Log("npx serve .zeabur/output/static")
} else {
opt.Log("docker run -p 8080:8080 -e PORT=8080 -it " + *opt.ResultImage)
opt.Log("docker run -p 8080:8080 -e PORT=8080 -it %s", *opt.ResultImage)
}
}
}
Expand Down

0 comments on commit f4a2afc

Please sign in to comment.