mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 10:27:26 +00:00
Feat: Make run testable
This commit is contained in:
@@ -174,6 +174,7 @@ var runCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Debug().Msgf("injecting the following environment variables into shell: %v", env)
|
log.Debug().Msgf("injecting the following environment variables into shell: %v", env)
|
||||||
|
util.HandleSendTestEnvVars(cmd, env)
|
||||||
|
|
||||||
Telemetry.CaptureEvent("cli-command:run",
|
Telemetry.CaptureEvent("cli-command:run",
|
||||||
posthog.NewProperties().
|
posthog.NewProperties().
|
||||||
@@ -310,7 +311,10 @@ func execCmd(cmd *exec.Cmd) error {
|
|||||||
return fmt.Errorf("failed to wait for command termination: %v", err)
|
return fmt.Errorf("failed to wait for command termination: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
waitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus)
|
if !util.IS_TEST_MODE {
|
||||||
os.Exit(waitStatus.ExitStatus())
|
waitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus)
|
||||||
|
os.Exit(waitStatus.ExitStatus())
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user