| 1836 | return cmd; |
| 1837 | } |
| 1838 | _processLineBuffer(data, strBuffer, onLine) { |
| 1839 | try { |
| 1840 | let s = strBuffer + data.toString(); |
| 1841 | let n = s.indexOf(os.EOL); |
| 1842 | while (n > -1) { |
| 1843 | const line = s.substring(0, n); |
| 1844 | onLine(line); |
| 1845 | // the rest of the string ... |
| 1846 | s = s.substring(n + os.EOL.length); |
| 1847 | n = s.indexOf(os.EOL); |
| 1848 | } |
| 1849 | return s; |
| 1850 | } |
| 1851 | catch (err) { |
| 1852 | // streaming lines to console is best effort. Don't fail a build. |
| 1853 | this._debug(`error processing line. Failed with error ${err}`); |
| 1854 | return ''; |
| 1855 | } |
| 1856 | } |
| 1857 | _getSpawnFileName() { |
| 1858 | if (IS_WINDOWS) { |
| 1859 | if (this._isCmdFile()) { |