mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
hack around start line 1, end line 1
This commit is contained in:
parent
eada4ce83f
commit
2e93fc22e2
@ -202,6 +202,11 @@ export default ['$log', 'moment', function($log, moment){
|
||||
let lineNums = _.range(event.start_line + 1,
|
||||
event.end_line + 1);
|
||||
|
||||
// hack around no-carriage return issues
|
||||
if (!lineNums.length) {
|
||||
lineNums = [event.start_line + 1];
|
||||
}
|
||||
|
||||
let lines = event.stdout
|
||||
.replace("\t", " ")
|
||||
.split("\r\n");
|
||||
@ -214,6 +219,11 @@ export default ['$log', 'moment', function($log, moment){
|
||||
}
|
||||
}
|
||||
|
||||
// hack around no-carriage return issues
|
||||
if (lineNums.length === lines.length) {
|
||||
return _.zip(lineNums, lines);
|
||||
}
|
||||
|
||||
return _.zip(lineNums, lines).slice(0, -1);
|
||||
},
|
||||
// public function that provides the parsed stdout line, given a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user