Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windows support #194

Merged
merged 5 commits into from
Feb 3, 2020
Merged

Add windows support #194

merged 5 commits into from
Feb 3, 2020

Conversation

mojoaxel
Copy link
Contributor

@mojoaxel mojoaxel commented Feb 2, 2020

fixes #111
see also #175

@mojoaxel mojoaxel requested a review from mthenw February 2, 2020 20:33
@@ -14,7 +14,7 @@

## Features

* log rotation
* log rotation (not on windows!)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* log rotation (not on windows!)
* log rotation (not on Windows)

@@ -16,43 +18,54 @@ function Tail(path, opts) {
};
this._buffer = new CBuffer(options.buffer);

var stream;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var stream;
let stream;

followOpt = '-f';
}

const tail = childProcess.spawn('tail', ['-n', options.buffer, followOpt].concat(path));

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

/* Check if this os provides the `tail` command. */
const hasTailCommand = commandExistsSync('tail');
if (hasTailCommand) {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}
util.inherits(Tail, events.EventEmitter);

Tail.prototype.getBuffer = function getBuffer() {
return this._buffer.toArray();
};

module.exports = (path, options) => new Tail(path, options);
module.exports = (path, options) => new Tail(path, options);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
module.exports = (path, options) => new Tail(path, options);
module.exports = (path, options) => new Tail(path, options);

@mthenw mthenw merged commit 0eac303 into mthenw:master Feb 3, 2020
@mthenw
Copy link
Owner

mthenw commented Feb 3, 2020

Thanks. I will fix the minor issues once it's in the master.

@mojoaxel
Copy link
Contributor Author

mojoaxel commented Feb 3, 2020

@mthenw Thanks! 🎉 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows support
2 participants