Skip to content

Commit 577002c

Browse files
modify the description messages
Signed-off-by: Shivam Purohit <[email protected]>
1 parent c86f551 commit 577002c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/apis/environment/environment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func DeleteEnvironment(pid string, envid string, cred types.Credentials) (Delete
117117
return DeleteChaosEnvironmentData{}, errors.New("Error in Deleting Chaos Environment: " + err.Error())
118118
}
119119

120-
bodyBytes, err := ioutil.ReadAll(resp.Body)
120+
bodyBytes, err := io.ReadAll(resp.Body)
121121
defer resp.Body.Close()
122122
if err != nil {
123123
return DeleteChaosEnvironmentData{}, errors.New("Error in Deleting Chaos Environment: " + err.Error())

pkg/cmd/delete/environment.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Note: The default location of the config file is $HOME/.litmusconfig, and can be
105105
environmentList, err := environment.GetEnvironmentList(projectID, credentials)
106106
if err != nil {
107107
if strings.Contains(err.Error(), "permission_denied") {
108-
utils.Red.Println("❌ You don't have enough permissions to access this resource.")
108+
utils.Red.Println("❌ You don't have enough permissions to delete an environment.")
109109
os.Exit(1)
110110
} else {
111111
utils.PrintError(err)
@@ -116,8 +116,8 @@ Note: The default location of the config file is $HOME/.litmusconfig, and can be
116116
for i := 0; i < len(environmentListData); i++ {
117117
if environmentListData[i].EnvironmentID == environmentID {
118118
if len(environmentListData[i].InfraIDs) > 0 {
119-
utils.Red.Println("Chaos Infras present in the Chaos Environment")
120-
utils.Red.Println("Delete the Chaos Infras first to delete the Environment")
119+
utils.Red.Println("Chaos Infras present in the Chaos Environment" +
120+
"delete the Chaos Infras first to delete the Environment")
121121
os.Exit(1)
122122
}
123123
}

0 commit comments

Comments
 (0)