Skip to content

Commit 4111f57

Browse files
authored
Add --env flag to python client logs after deploy (#1487)
1 parent d7a08f7 commit 4111f57

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cli/cmd/root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ func printEnvIfNotSpecified(envName string, cmd *cobra.Command) error {
213213
return err
214214
}
215215

216-
if _flagOutput == flags.PrettyOutputType {
216+
if out != "" {
217217
fmt.Print(out)
218218
}
219+
219220
return nil
220221
}
221222

pkg/workloads/cortex/client/cortex/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ def stream_to_stdout(process):
8383
env = os.environ.copy()
8484
env["CORTEX_CLI_INVOKER"] = "python"
8585
process = subprocess.Popen(
86-
[get_cli_path(), "logs", api_name],
86+
[get_cli_path(), "logs", "--env", self.env, api_name],
8787
stderr=subprocess.STDOUT,
8888
stdout=subprocess.PIPE,
8989
encoding="utf8",
9090
env=env,
9191
)
9292

93-
streamer = threading.Thread(target=stream_to_stdout, args=(process,))
93+
streamer = threading.Thread(target=stream_to_stdout, args=[process])
9494
streamer.start()
9595

9696
while process.poll() is None:

0 commit comments

Comments
 (0)