Repository navigation
Show console output from Windows when ELECTRON_RUN_AS_NODE is set - #7578
Merged
Merged
Conversation
kevinsawicki
force-pushed
the
windows-logging
branch
4 times, most recently
from
October 12, 2016 20:48
dd32c08 to
a8382d6
Compare
Contributor
|
@kevinsawicki thanks 👍 |
Contributor
|
👍 |
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 25, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 25, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 25, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 25, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 25, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 26, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 26, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
jviotti
pushed a commit
to balena-io/etcher
that referenced
this pull request
Oct 26, 2016
This PR makes use of `node-ipc` to emit progress information from the child CLI to the GUI process rather than the tailing approach we've been doing until now. This change was motivated by the following Electron fix which landed in v1.4.4: electron/electron#7578. Before such fix, Electron would not output anything to stdout/stderr if the Electron process was running with `ELECTRON_RUN_AS_NODE` under Windows, which forced us to implement `--log` option in the Etcher CLI to output state information to a file. Since this issue is fixed, we can consume the Etcher CLI output from within `child_process.spawn`, which opens more interesting possibilities for sharing information between both processes. This coindentally fixes a Windows issue where the tailing module would receive malformed JSON, causing Etcher to crash at `JSON.parse`. The reason of this problem was a bug in the tailing module we were using. Fixes: #642 Change-Type: patch Changelog-Entry: Fix "Unexpected end of JSON" error in Windows. Signed-off-by: Juan Cruz Viotti <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request follows the approach outlined in #5715 (comment) to enable console output on Windows when electron is run with
ELECTRON_RUN_AS_NODE.Exposes
process.logwhen run in a node context and calls that from the fallback streams created whenstdoutandstderrfail to initialize in node (which is happening on release builds).Depends on electron/node#19
/cc @bpasero