-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment breaks when done from different platforms (e.g. Windows and Mac) #3478
Comments
I can confirm the problem. However, in my case it does not really seem to be related to the platform, as I always deploy from Windows and always from the Git Bash. Nevertheless, I ended up with a
which currently breaks deployment. |
Looks like problem is with usage of escapeshell. |
I have no clue how to fix it, so I asked the community: https://phpc.social/@Schrank/109812249564590328 Hope this helps :-) |
P.S. I can't reproduce it on mac (12.6.1 (21G217)) in the current version (Deployer 7.1.3) |
I know how to fix it. The same way I did in google/zx. |
Like this? https://github.com/google/zx/blob/691e6cb01cae7c046bad2fdf5535c2a9ba6e87f3/src/util.ts#L35-L48 Cool, taking notes |
Yes) |
This issue has been automatically closed. Please, open a discussion for bug reports and feature requests. Read more: [https://github.com//discussions/3888] |
This was fixed in #3603 and released with |
Deployer version: 7.1.3
Deployment OS: Windows and Mac
it can be any deploy.php which uses the default "deploy:release" task
Steps:
=> Error: "undefined array key 2" in release.php on line 49
Explanation:
For each deployment, a line is added to the file .dep/release_log
This is done in vendor/deployer/deployer/recipe/deploy/release.php in line 126 with the following code
$json = escapeshellarg(json_encode($metainfo));
Unfortunately, in Windows, escapeshellarg replaces all double quotes in the string by spaces.
https://www.php.net/manual/en/function.escapeshellarg.php
This results for example in the following entry:
{ created_at : 2023-01-12T09:44:54+0000 , release_name : 7 , user : Firstname Lastname , target : HEAD }
When this line is read and parsed by deployer on a different OS (e.g. Mac), it can not be parsed.
It can only be parsed when the double quotes are contained:
{"created_at":"2023-01-12T09:44:54+0000","release_name":"7","user":"Firstname Lastname","target":"HEAD"}
Upvote & Fund
The text was updated successfully, but these errors were encountered: