Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

Conversation

@sidiqaldi
Copy link
Contributor

fix Automatic Installation doesn't work well on windows OS

@pascalbaljet
Copy link
Contributor

pascalbaljet commented Aug 2, 2022

I see that it works, but I don't fully understand why. PHP_EOL is supposed to be OS independent, right? PHP_EOL is \r\n on Windows, so why do we have to force \n on Windows?

@pascalbaljet pascalbaljet force-pushed the fix/automatic-installation-on-windows-env branch 2 times, most recently from b13e2ad to 54fd42b Compare August 2, 2022 11:47
@pascalbaljet pascalbaljet force-pushed the fix/automatic-installation-on-windows-env branch from 858a86e to b3b164c Compare August 2, 2022 12:46
@pascalbaljet pascalbaljet merged commit 56d8f7f into protonemedia:main Aug 2, 2022
@pascalbaljet
Copy link
Contributor

@sidiqaldi Thanks for helping!

@sidiqaldi
Copy link
Contributor Author

sidiqaldi commented Aug 3, 2022

Windows support both EOL with \r and \n so I think it's ok to force using \n like in unix based.

https://stackoverflow.com/questions/128560/when-do-i-use-the-php-constant-php-eol

@Rattone
Copy link

Rattone commented Jan 26, 2023

I don't understand why PHP_EOL doesn't already do what it's meant to do. Do you have an explanation?
I also can't find the definition of windows_os()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants