add project-config-dir flag for run command

This commit is contained in:
Maidul Islam
2024-01-11 16:39:02 -05:00
parent 766f301aea
commit efcbf1aa88
7 changed files with 90 additions and 20 deletions
+11
View File
@@ -105,6 +105,17 @@ func RequireLocalWorkspaceFile() {
}
}
func ValidateWorkspaceFile(projectConfigFilePath string) {
workspaceFilePath, err := GetWorkSpaceFromFilePath(projectConfigFilePath)
if err != nil {
PrintErrorMessageAndExit(fmt.Sprintf("error reading your project config %v", err))
}
if workspaceFilePath.WorkspaceId == "" {
PrintErrorMessageAndExit("Your project id is missing in your local config file. Please add it or run again [infisical init]")
}
}
func GetHashFromStringList(list []string) string {
hash := sha256.New()