Skip to content

Add support for windows run with cygwin#69

Closed
PurHur wants to merge 1 commit into
ircmaxell:masterfrom
PurHur:windows/make-docker-console-cygwin
Closed

Add support for windows run with cygwin#69
PurHur wants to merge 1 commit into
ircmaxell:masterfrom
PurHur:windows/make-docker-console-cygwin

Conversation

@PurHur

@PurHur PurHur commented May 5, 2019

Copy link
Copy Markdown

I removed the php command because there is a cygwin support layer in bin/phpunit. Im no windows guy but looks fine for me?

Error:

purhur@purhur-PC MINGW64 ~/php-compiler (master)
$ docker run -v /c/Users/purhur/php-compiler:/compiler ircmaxell/php-compiler:1
6.04-dev php vendor/bin/phpunit

dir=$(cd "${0%[/\\]*}" > /dev/null; cd '../phpunit/phpunit' && pwd)

if [ -d /proc/cygdrive ]; then
    case $(which php) in
        $(readlink -n /proc/cygdrive)/*)
            # We are in Cygwin using Windows php, so the path must be translated
            dir=$(cygpath -m "$dir");
            ;;
    esac
fi

"${dir}/phpunit" "$@"

With the fix:

purhur@purhur-PC MINGW64 ~/php-compiler (master)
$ docker run -v /c/Users/purhur/php-compiler:/compiler ircmaxell/php-compiler:1
6.04-dev vendor/bin/phpunit
PHPUnit 8.2-g21ee615 by Sebastian Bergmann and contributors.

..........................................................        58 / 58 (100%)

Time: 1.29 minutes, Memory: 6.00 MB

OK (58 tests, 86 assertions)

Without the php it runs fine with Ubutu 16 as host and windows 7 with cygwin docker-for-windows console as host system.

@driusan

driusan commented May 5, 2019

Copy link
Copy Markdown
Collaborator

Maybe there should be an Appveyor build to test on Windows too?

@PurHur

PurHur commented May 5, 2019

Copy link
Copy Markdown
Author

It works very easy under windows, even testing.

Git for Windows
Docker for Windows
Make Port for Windows
copy content to ...\Git\mingw64\

And it runs.

@PurHur PurHur closed this Jul 16, 2026
@PurHur PurHur deleted the windows/make-docker-console-cygwin branch July 16, 2026 00:14
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.

2 participants