Skip to content

Support for running bash commands on Windows (via sh instead of bash) - #331

Closed
pmatysek wants to merge 1 commit into
kscripting:masterfrom
pmatysek:master
Closed

pmatysek wants to merge 1 commit into
kscripting:masterfrom
pmatysek:master

Conversation

@pmatysek

Copy link
Copy Markdown

Kotlin was in my PATH, bu I was getting error [kscript] [ERROR] kotlinc is not in PATH. So I've made some investigation and testing. As I figured out problem was with bash -c command. For some reason it's not showing any output neither while running on my windows cmd nor from kscript. There wasn't any output even from simple echo. Fortunately I found that command sh -c is working perfectly.
For that reason I wrote some piece of code which is choosing proper bash command for OS.
However I'm not sure if problem is only in my enviroment (with git-bash instalation or some windows configuration?) or global for windows.

@holgerbrandl

Copy link
Copy Markdown
Collaborator

I have no issues running kscript on windows. Neither using Cmder nor git-bash. So I still feel unsure about the PR

@aartiPl

aartiPl commented Jul 9, 2022

Copy link
Copy Markdown
Collaborator

The solution is now applied in similar form on kscript_4.1 branch. Closing this PR because of that.

@aartiPl aartiPl closed this Jul 9, 2022
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