Skip to content

Conversation

@DavenportEmma
Copy link
Contributor

No description provided.

index.js Outdated
.on('end', () => {
fs.writeFile(systemInfoPath, chunks.toString(), 'utf-8', function () {
})
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this instead of just copying the file? The other (and more efficient way of doing this if it's really needed is to just pipe from one stream to another...)

const in = fs.createReadStream(paths['/systeminfo'])
const out = fs.createWriteStream(systemInfoPath)
stream.pipeline(in, out, (err) => {
  if (err) /** handle the error **/
})

Copy link
Contributor

Choose a reason for hiding this comment

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

Really tho, I'm just not sure why this copy is necessary at all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I see that, it's not a very good solution, it was originally a problem with accessing the data file. But I've updated it there.

@jasnell
Copy link
Contributor

jasnell commented Apr 24, 2020

Good start. Please also be sure to include the command line arguments used to launch clinic

@goto-bus-stop
Copy link
Contributor

@DavenportEmma DavenportEmma marked this pull request as ready for review April 27, 2020 14:35
@DavenportEmma DavenportEmma requested a review from jasnell April 27, 2020 16:54
Copy link
Contributor

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

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

oops…had review comments still in the queue…don't know if you'll have time for this anymore, no matter either way :)

@jasnell jasnell changed the base branch from master to main August 21, 2020 18:59
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.

3 participants