mirror of
https://github.com/php/web-rmtools.git
synced 2026-03-24 09:12:18 +01:00
snap builder is locale dependend #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cmb69 on GitHub (Mar 22, 2019).
snapshot_task.bat uses the pseudo environment variables
%date%and%time%to construct a timestamp for the log files. To correctly work, this requires the machine to use an English locale; otherwise the timestamp is broken (e.g. with a German locale is could be13-03-2019_42-25instead of2019-03-22_13-42-25). Even worse, at least some locales will contain a comma, so that snap.bat will effectively be called with an additional parameter, as such setting force mode. For instance, callingsnapshot_task.bat --task-args "php72 nts-windows-vc15-x64"with a German locale, will call something likesnap.bat php72 nts-windows-vc15-x64 ,14-..log.We should either determine the timestamp in a locale independend manner, or require an English locale.
@weltling commented on GitHub (Mar 22, 2019):
Good catch. Perhaps one could yous powershell for that? Otherwise, not sure by we might use the PHP contained in the binary SDK, as it's required anyway.
Thanks.
@cmb69 commented on GitHub (Mar 22, 2019):
https://stackoverflow.com/questions/10945572/windows-batch-formatted-date-into-variable#answer-28250863 lists a bunch of options. If we're concerned that powershell would not be available, a simple JScript script would also be an option. And, yeah, we could also use PHP.
@weltling commented on GitHub (Mar 22, 2019):
Powershell should be available on the build host, actually. Not critical what is used of those three, anyway, but fixing this would be ofc nice :)
Thanks.
@cmb69 commented on GitHub (Mar 24, 2019):
Fixed with
6baf0ef19d.