Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor(run): set up variable before call

Mahyar Mirrashed427201a63427
diff --git a/cli/packages/cmd/run.go b/cli/packages/cmd/run.go
index e75f5eee4b..8d2e35fd5d 100644
--- a/cli/packages/cmd/run.go
+++ b/cli/packages/cmd/run.go
@@ -138,7 +138,8 @@ var runCmd = &cobra.Command{
log.Debug().Msgf("Confirming selected environment is valid: %s", environmentName)
- hasEnvironment, err := confirmProjectHasEnvironment(projectId, environmentName, token)
+ var hasEnvironment bool
+ hasEnvironment, err = confirmProjectHasEnvironment(environmentName, projectId, token)
if err != nil {
util.HandleError(err, "Could not confirm project has environment")
}