question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run in bash shell

See original GitHub issue

https://github.com/tonerdo/coverlet/blob/75a43d2a39a8733289875c3b00ebdbb64adc4385/src/coverlet.msbuild/coverlet.msbuild.props#L11

Output gets formatted with \ resulting in trying to write to a directory not supported by non-CMD terminals. Additionally, running without /p:CoverletOutputDirecotory results in Project file does not exist error.

Not sure how to work around this, or if it’s possible given that this value is hardcoded.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
xtiancapilcommented, Apr 23, 2018

@paulers I was running into a similar issue going from git bash shell to my jenkins running linux and dotnet core. I ended up creating a MSBuild Response file (msbuild.rsp) and referencing that in the command line. It’s a new line separated file where you can define arguments you want msbuild to use. This is what I have in mine (named coverage.rsp)

/p:DebugType=full
/p:CollectCoverage=true
/p:CoverletOutputFormat=opencover

Then the command-line or your bash script would will now look like this:

dotnet test TestProject/TestProject.csproj -c Release --no-build @coverage.rsp
1reaction
voronoipotatocommented, Apr 11, 2018

Git bash replaces forward with backward slashes a bit indiscriminately. See https://github.com/yarnpkg/yarn/issues/2785 . I have like a hundred dollar bounty on this issue if anyone’s bored.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't run Bash script
To run the script you can specify full pathname as tikend's answer. If you want to use it as a command from any...
Read more >
Unable to run shell script in terminal
Try this $ cd /path/to/script && ./myscript.sh. If it doesn't work run this command as superuser.
Read more >
Unable to run shell script in windows 10 with Bash on Ubuntu
1 Answer 1 · This script is compiled in such a way that matters where it is running. · Another possible problem -...
Read more >
Bash script won't run
I'm trying to run a bash script named 'serverloadtest.sh' to test a server is performing correctly. However, when I type serverloadtest.sh ...
Read more >
Unable to run bash scripts on a windows installed runner
When trying to run a bash script against a windows runner, all the path separators are missing. Presumably the runner is sending backslashes ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found