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