mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 09:27:50 +00:00
fix(run): grap workspace id from workspace file if not defined on the cli
This commit is contained in:
@@ -470,6 +470,15 @@ func confirmProjectHasEnvironment(environmentName, projectId string, token *mode
|
|||||||
accessToken = loggedInUserDetails.UserCredentials.JTWToken
|
accessToken = loggedInUserDetails.UserCredentials.JTWToken
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if projectId == "" {
|
||||||
|
workspaceFile, err := util.GetWorkSpaceFromFile()
|
||||||
|
if err != nil {
|
||||||
|
util.HandleError(err, "Unable to get local project details")
|
||||||
|
}
|
||||||
|
|
||||||
|
projectId = workspaceFile.WorkspaceId
|
||||||
|
}
|
||||||
|
|
||||||
project, err := util.GetProjectDetails(accessToken, projectId)
|
project, err := util.GetProjectDetails(accessToken, projectId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
|||||||
Reference in New Issue
Block a user