# Windows builds: how to copy only some tools to the git bash root

**URL:** <https://travis-ci.community/t/windows-builds-how-to-copy-only-some-tools-to-the-git-bash-root/6323>\
**Category:** Windows\
**Tags:** build-env\
**Created:** [December 6, 2019, 5:38am UTC](https://travis-ci.community/t/windows-builds-how-to-copy-only-some-tools-to-the-git-bash-root/6323 "2019-12-06T05:38:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stdevPavelmc](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@stdevPavelmc](https://travis-ci.community/u/stdevPavelmc)\
**Post date:** [December 6, 2019, 5:38am UTC](https://travis-ci.community/t/windows-builds-how-to-copy-only-some-tools-to-the-git-bash-root/6323/1 "2019-12-06T05:38:07Z")

</div>

I have a build process in which I need some tools from msys2, I can use choco to install msys2 and then managed to use the pacman tool from msys2 to install some tools like SDL2 and others, in my local space I can copy the bin, dlls & includes to the linux root inside the git-win shell but travis fails with access denied and some times with other errors, see it here: [https://travis-ci.org/stdevPavelmc/skywallet-mcu/jobs/621425340#L758](https://travis-ci.org/stdevPavelmc/skywallet-mcu/jobs/621425340#L758) & here [https://github.com/stdevPavelmc/skywallet-mcu/blob/develop/ci-scripts/install-win.sh](https://github.com/stdevPavelmc/skywallet-mcu/blob/develop/ci-scripts/install-win.sh)

The is a way to circumvent that or maybe other not including PATH mixing, mixing both git-win & msys2 fs space will give more troubles, I’m just copying some of the tools from msys2 to the git bash root.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 6, 2019, 6:14pm UTC](https://travis-ci.community/t/windows-builds-how-to-copy-only-some-tools-to-the-git-bash-root/6323/2 "2019-12-06T18:14:55Z")

</div>

Mixing up environments of Git and MSYS is not a good idea because they both emulate a UNIX environment, in slightly different ways (at the very least, the emulated mount points are different), so mixing them up is very likely to cause conflicts and breakages. Moreover, if the specific versions of Windows Git and MSYS2 happen to be based on different versions of `cygwin1.dll`, you won’t be able to launch executables from the other ecosystem at all.

It’s better to rather run your commands in a proper MSYS2 environment:

> [@How do I use mingw and msys2 shells?](https://travis-ci.community/t/how-do-i-use-mingw-and-msys2-shells/1787):
>
> Hello, I have successfully installed msys2 via choco install -y msys2 and it is installed to C:\tools\msys64 but I am unsure of the way to invoke the mingw and msys2 shells in order to run its commands such as installing packages using pacman and using them. I have tried to use C:\tools\msys64\usr\bin\bash -lc 'COMMAND' but i hit fatal error - cygheap base mismatch detected.. Is this the correct way and that I should try and fix this error? Thank you for the help!
