Env var to identify when in container shell

This commit is contained in:
Brian Phan
2022-11-29 09:15:09 -08:00
parent 149a4d33f4
commit 3e8bd09990

View File

@@ -40,6 +40,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
c.Stdout = os.Stdout
c.Stderr = os.Stderr
os.Setenv("WW_CONTAINER_SHELL", "true")
if err := c.Run(); err != nil {
fmt.Println(err)
os.Exit(1)