Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ func getApplicationData(context context.T, command string, args []string) (data
log.Debugf("Command Stderr: %v", string(output))
err = fmt.Errorf("Command failed with error: %v", string(output))
} else {
cmdOutput := string(output)
cmdOutputRaw := string(output)
cmdOutput := handleCtrlChars(cmdOutputRaw)
// parse snap result
if command == "snap" {
cmdOutput = parseSnapOutput(context, cmdOutput)
Expand All @@ -374,6 +375,10 @@ func getApplicationData(context context.T, command string, args []string) (data
return
}

func handleCtrlChars(s string) string {
return strings.Replace(s, "\x0D", "", -1)
}

// convertToApplicationData converts query output into json string so that it can be deserialized easily
func convertToApplicationData(input string) (data []model.ApplicationData, err error) {

Expand Down