Skip to content

Commit

Permalink
fix: Fix zsh tab issue (#1129)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <cegao@tensorchord.ai>

Signed-off-by: Ce Gao <cegao@tensorchord.ai>
  • Loading branch information
gaocegege committed Nov 1, 2022
1 parent cff88a9 commit 8776a25
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/app/debug_llb.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var CommandDebugLLB = &cli.Command{
}

func debugLLB(clicontext *cli.Context) error {
telemetry.GetReporter().Telemetry("debug-llb", nil)
telemetry.GetReporter().Telemetry("debug-llb")
opt, err := ParseBuildOpt(clicontext)
if err != nil {
return err
Expand Down
7 changes: 4 additions & 3 deletions pkg/builder/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ func ImageConfigStr(labels map[string]string, ports map[string]struct{},
pl := platforms.Normalize(platforms.DefaultSpec())
img := v1.Image{
Config: v1.ImageConfig{
Labels: labels,
WorkingDir: "/",
Env: append(env, "PATH="+DefaultPathEnv(pl.OS)),
Labels: labels,
WorkingDir: "/",
Env: append(env,
"PATH="+DefaultPathEnv(pl.OS), "LC_ALL=en_US.UTF-8"),
ExposedPorts: ports,
Entrypoint: entrypoint,
},
Expand Down
1 change: 1 addition & 0 deletions pkg/lang/ir/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (g *Graph) preparePythonBase(root llb.State) llb.State {
sb.WriteString("&& rm -rf /var/lib/apt/lists/* ")
// shell prompt
sb.WriteString("&& curl --proto '=https' --tlsv1.2 -sSf https://starship.rs/install.sh | sh -s -- -y")
sb.WriteString("&& locale-gen en_US.UTF-8")

run := root.Run(llb.Shlex(fmt.Sprintf("bash -c \"%s\"", sb.String())),
llb.WithCustomName("[internal] install built-in packages"))
Expand Down
5 changes: 3 additions & 2 deletions pkg/types/envd.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ var BaseEnvironment = []struct {
}{
{"DEBIAN_FRONTEND", "noninteractive"},
{"PATH", DefaultPathEnvUnix},
{"LANG", "C.UTF-8"},
{"LC_ALL", "C.UTF-8"},
{"LANG", "en_US.UTF-8"},
{"LC_ALL", "en_US.UTF-8"},
}
var BaseAptPackage = []string{
"bash-static",
Expand All @@ -81,6 +81,7 @@ var BaseAptPackage = []string{
"sudo",
"vim",
"zsh",
"locales",
}

type EnvdImage struct {
Expand Down

0 comments on commit 8776a25

Please sign in to comment.