xdissent / iectrl

Command line interface and Node module for managing ievms virtual machines
http://xdissent.github.io/iectrl
MIT License
197 stars 14 forks source link

end of line character on Windows #21

Closed malys closed 3 years ago

malys commented 9 years ago

All project using ievms.coffee are impacted.

End of line character is a constant in your code "\n".

Could you replace massively \n to

var endOfLine = require('os').EOL;

example:

    IEVM.prototype.parseInfo = function(s) {
        var line, obj, pieces, _i, _len, _ref2;
        obj = {};

        _ref2 = s.trim().split(endOfLine);

        for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
            line = _ref2[_i];
            pieces = line.split('=');
            obj[pieces.shift()] = pieces.join('=').replace(/^"/, '').replace(/"$/, '');
        }

        return obj;
    };

with this change your projects work fine on Windows.

Thank you for your job