Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
mosaic: pass through SST_STAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Jul 8, 2024
1 parent 27912c4 commit 5e7e748
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmd/sst/mosaic/mosaic.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ func CmdMosaic(c *cli.Cli) error {

currentExecutable, _ := os.Executable()
multi, err := multiplexer.New()
multiEnv := fmt.Sprintf("SST_SERVER=http://localhost:%v", server.Port)
multi.AddPane("deploy", []string{currentExecutable, "mosaic-deploy"}, "Deploy", "", false, multiEnv)
multi.AddPane("shell", []string{currentExecutable, "shell"}, "Shell", "", true, multiEnv)
multiEnv := []string{
fmt.Sprintf("SST_SERVER=http://localhost:%v", server.Port),
"SST_STAGE=" + p.App().Stage,
}
multi.AddPane("deploy", []string{currentExecutable, "mosaic-deploy"}, "Deploy", "", false, multiEnv...)
multi.AddPane("shell", []string{currentExecutable, "shell"}, "Shell", "", true, multiEnv...)

wg.Go(func() error {
defer c.Cancel()
Expand All @@ -140,12 +143,12 @@ func CmdMosaic(c *cli.Cli) error {
slog.Info("mosaic", "dev", d.Name, "directory", dir)
multi.AddPane(
d.Name,
append([]string{currentExecutable, "mosaic"},
append([]string{currentExecutable, "mosaic", "--"},
strings.Split(d.Command, " ")...),
d.Name,
dir,
true,
multiEnv,
multiEnv...,
)
}
break
Expand Down

0 comments on commit 5e7e748

Please sign in to comment.