Answers.Body: <p>Installing gpatch is the solution recommended here. The symptoms are the same, the process freezes waiting for input on 'which file to patch'.</p>
  <p><a href="https://github.com/cweagans/composer-patches/issues/423" rel="nofollow noreferrer">https://github.com/cweagans/composer-patches/issues/423</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-27T09:09:55.657Z
Answers.LastActivityDate: 2022-11-27T09:09:55.657Z
Answers.UserDisplayName: Interlated
Body: <p>I've just updated to MacOS ventura 13.0.1. How do I get composer update to work?</p>
  <ul>
  <li>Applying patches for pear/mail_mime
  <a href="https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch" rel="nofollow noreferrer">https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch</a> (Apply patch for CRM-3133 wordwrap body to be 750 characters to apply with RFC 2821)
  Could not apply patch! Skipping. The error was: The process &quot;patch '-p1' --no-backup-if-mismatch -d '/Sites/electrifyingbradfield/vendor/pear/mail_mime' &lt; '/var/folders/q4/6fm4gd05575d6snq43_pcggm0000gn/T/63830c0849b7b.patch'&quot; exceeded the timeout of 300 seconds.</li>
  </ul>
  <p>The version of patch</p>
  <pre><code> patch -v
   patch 2.0-12u11-Apple
  </code></pre>
  <p>The patch file is there</p>
  <pre><code>cat /var/folders/q4/6fm4gd05575d6snq43_pcggm0000gn/T/63830c0849b7b.patch 
  --- Mail/mime.php   2020-06-27 18:35:27.000000000 +1000
  +++ Mail/mime.php   2020-07-25 08:36:14.570334621 +1000
  @@ -1527,6 +1527,9 @@
               $this-&gt;{$type} .= $data;
           }
   
  +        // wordwrap the txtbody to be 750 characters to comply with RFC 2821
  +        // CRM-3133
  +        $this-&gt;{$type} = wordwrap($this-&gt;{$type}, 750);
           return true;
       }
  </code></pre>
  <p>If I run the command manually there is a prompt for 'file to patch'</p>
  <pre><code>% patch -p1 --no-backup-if-mismatch -d  /Users/jrobens/Sites/electrifyingbradfield/vendor/pear/mail_mime &lt; '/var/folders/q4/6fm4gd05575d6snq43_pcggm0000gn/T/63830c0849b7b.patch'
  
  File to patch: ^C% 
  </code></pre>
  <p>The man page provides 2 scenarios</p>
  <blockquote>
  <pre><code> patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory] [-g vcs-option] [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]
       [-r rej-name] [-T | -Z] [-V t | nil | never | none] [-x number] [-Y prefix] [-&gt; z backup-ext] [--quoting-style style] [--posix] [origfile [patchfile]]
  </code></pre>
  <p>patch &lt;patchfile</p>
  </blockquote>
  <p>This works</p>
  <blockquote>
  <p>patch  -d vendor/pear/mail_mime &lt; '/var/folders/q4/6fm4gd05575d6snq43_pcggm0000gn/T/63830c0849b7b.patch'</p>
  </blockquote>
  <blockquote>
  <p>patching file 'Mail/mime.php'</p>
  </blockquote>
  <p>Adding -p1 does not</p>
  
Tags: <composer>
Title: Applying patches that time out on composer update?
ThreadText: # Applying patches that time out on composer update?
  
  (Asked by: username_0 on 2022-11-27)
  
  I've just updated to MacOS ventura 13.0.1. How do I get composer update to work?
  
  * Applying patches for pear/mail\_mime
    <https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch> (Apply patch for CRM-3133 wordwrap body to be 750 characters to apply with RFC 2821)
    Could not apply patch! Skipping. The error was: The process "patch '-p1' --no-backup-if-mismatch -d '/Sites/electrifyingbradfield/vendor/pear/mail\_mime' < '/var/folders/q4/6fm4gd05575d6snq43\_pcggm0000gn/T/63830c0849b7b.patch'" exceeded the timeout of 300 seconds.
  
  The version of patch
  
  ```
   patch -v
   patch 2.0-12u11-Apple
  
  ```
  
  The patch file is there
  
  ```
  cat /var/folders/q4/6fm4gd05575d6snq43_pcggm0000gn/T/63830c0849b7b.patch 
  --- Mail/mime.php   2020-06-27 18:35:27.000000000 +1000
  +++ Mail/mime.php   2020-07-25 08:36:14.570334621 +1000
  @@ -1527,6 +1527,9 @@
               $this->{$type} .= $data;
           }
   
  +        // wordwrap the txtbody to be 750 characters to comply with RFC 2821
  +        // CRM-3133
  +        $this->{$type} = wordwrap($this->{$type}, 750);
           return true;
       }
  
  ```
  
  If I run the command manually there is a prompt for 'file to patch'
  
  ```
  % patch -p1 --no-backup-if-mismatch -d  /Users/jrobens/Sites/electrifyingbradfield/vendor/pear/mail_mime < '/var/folders/q4/6fm4gd05575d6snq43_pcggm0000gn/T/63830c0849b7b.patch'
  
  File to patch: ^C% 
  
  ```
  
  The man page provides 2 scenarios
  
  > ```
  >  patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory] [-g vcs-option] [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]
  >      [-r rej-name] [-T | -Z] [-V t | nil | never | none] [-x number] [-Y prefix] [-> z backup-ext] [--quoting-style style] [--posix] [origfile [patchfile]]
  >
  > ```
  >
  > patch <patchfile
  
  This works
  
  > patch -d vendor/pear/mail\_mime < '/var/folders/q4/6fm4gd05575d6snq43\_pcggm0000gn/T/63830c0849b7b.patch'
  
  > patching file 'Mail/mime.php'
  
  Adding -p1 does not
  
  **Tags:** composer
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-11-27. Score: 1 | Accepted answer
  
  Installing gpatch is the solution recommended here. The symptoms are the same, the process freezes waiting for input on 'which file to patch'.
  
  <https://github.com/cweagans/composer-patches/issues/423>
  
  
  ---
  
  