atom-community / atom-community/atom-script

No result output to run a selected text on Windows

Open
#442 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

The atom-script runs with a selected text does not get any stdout except its execution time to script's output pane on **Windows version** of Atom. It is okay if the atom-script runs a whole file. With Linux version, there is no issue.
Both ruby and javascript I tried are failed to get the result output on run a selected text.
After some investigation, I have found a workaround as follows.

--- script-view.coffee

+++ script-view.coffee.windows
@@ -244,2 +244,3 @@
args = codeContext.shebangCommandArgs().concat args
+ args = args.map (n) -> n.trim()

This intends to remove both leading line feed (\n) characters and trailing them from selected text string. I don't know why this works on Windows.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.