Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
remove unused GetAllWorkSpaceConfigsStartingFromCurrentPath method
Maidul Islamff82af835881
diff --git a/cli/packages/util/config.go b/cli/packages/util/config.goindex 6bdb827bc0..525e43c097 100644--- a/cli/packages/util/config.go+++ b/cli/packages/util/config.go@@ -151,52 +151,6 @@ func GetWorkspaceConfigByPath(path string) (workspaceConfig models.WorkspaceConfreturn workspaceConfigFile, nil}-// Will get the list of .infisical.json files that are located-// within the root of each sub folder from where the CLI is ran from-func GetAllWorkSpaceConfigsStartingFromCurrentPath() (workspaces []models.WorkspaceConfigFile, err error) {- currentDir, err := os.Getwd()- if err != nil {- return nil, fmt.Errorf("GetAllProjectConfigs: unable to get the current directory because [%s]", err)- }-- files, err := os.ReadDir(currentDir)- if err != nil {- return nil, fmt.Errorf("GetAllProjectConfigs: unable to read the contents of the current directory because [%s]", err)- }-- listOfWorkSpaceConfigs := []models.WorkspaceConfigFile{}- for _, file := range files {- if !file.IsDir() && file.Name() == INFISICAL_WORKSPACE_CONFIG_FILE_NAME {- pathToWorkspaceConfigFile := currentDir + "/" + INFISICAL_WORKSPACE_CONFIG_FILE_NAME-- workspaceConfig, err := GetWorkspaceConfigByPath(pathToWorkspaceConfigFile)- if err != nil {- return nil, fmt.Errorf("GetAllProjectConfigs: Unable to get config file because [%s]", err)- }-- listOfWorkSpaceConfigs = append(listOfWorkSpaceConfigs, workspaceConfig)-- } else if file.IsDir() {- pathToSubFolder := currentDir + "/" + file.Name()- pathToMaybeWorkspaceConfigFile := pathToSubFolder + "/" + INFISICAL_WORKSPACE_CONFIG_FILE_NAME-- _, err := os.Stat(pathToMaybeWorkspaceConfigFile)- if err != nil {- continue // workspace config file doesn't exist- }-- workspaceConfig, err := GetWorkspaceConfigByPath(pathToMaybeWorkspaceConfigFile)- if err != nil {- return nil, fmt.Errorf("GetAllProjectConfigs: Unable to get config file because [%s]", err)- }-- listOfWorkSpaceConfigs = append(listOfWorkSpaceConfigs, workspaceConfig)- }- }-- return listOfWorkSpaceConfigs, nil-}-// Get the infisical config file and if it doesn't exist, return empty config model, otherwise raise errorfunc GetConfigFile() (models.ConfigFile, error) {fullConfigFilePath, _, err := GetFullConfigFilePath()