mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-10 07:58:15 -05:00
allow to set default env in project file
This commit is contained in:
@@ -39,7 +39,8 @@ type Workspace struct {
|
||||
}
|
||||
|
||||
type WorkspaceConfigFile struct {
|
||||
WorkspaceId string `json:"workspaceId"`
|
||||
WorkspaceId string `json:"workspaceId"`
|
||||
DefaultEnvironment string `json:"defaultEnvironment"`
|
||||
}
|
||||
|
||||
type SymmetricEncryptionResult struct {
|
||||
|
||||
@@ -131,6 +131,10 @@ func GetAllEnvironmentVariables(params models.GetAllSecretsParameters) ([]models
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if workspaceFile.DefaultEnvironment != "" {
|
||||
params.Environment = workspaceFile.DefaultEnvironment
|
||||
}
|
||||
|
||||
// Verify environment
|
||||
err = ValidateEnvironmentName(params.Environment, workspaceFile.WorkspaceId, loggedInUserDetails.UserCredentials)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user