bonfire-networks / bonfire-app

Bonfire - tend to your digital life in community. Customise and host your own online space and control your experience at the most granular level.
https://bonfirenetworks.org
GNU Affero General Public License v3.0
590 stars 44 forks source link

Bug: doctest Bonfire.Common.Extension.Diff fails in bonfire_common #1063

Closed fishinthecalculator closed 4 days ago

fishinthecalculator commented 3 weeks ago

Describe the bug The doctest fails with:

  3) doctest Bonfire.Common.Extensions.Diff.git_generate_diff/4 (1) (Bonfire.Common.DocsTest)             
     test/common/doctests/doctests_test.exs:24                                                            
     ** (FunctionClauseError) no function clause matching in Bonfire.Common.Extensions.Diff.git!/4        

     The following arguments were given to Bonfire.Common.Extensions.Diff.git!/4:                         

         # 1                                                                                              
         ["-c", "core.quotepath=false", "-c", "diff.algorithm=histogram", "diff", "--cached", "--no-color"
, "--output=./data/test_output.patch", "main"]                                                            

         # 2                                                                                              
         "./"                                                                                             

         # 3                                                                                              
         %IO.Stream{device: :standard_io, raw: false, line_or_bytes: :line}                               

         # 4                                                                                              
         nil                                                                                              

     Attempted function clauses (showing 1 out of 1):                                                     

         def git!(args, repo_path, into, original_cwd) when is_list(args) and is_binary(repo_path) and is_
binary(original_cwd)                                                                                      

     stacktrace:                                                                                          
       (bonfire_common 0.1.0) lib/modularity/extension_diff.ex:203: Bonfire.Common.Extensions.Diff.git!/4 

To Reproduce Steps to reproduce the behavior:

  1. uncomment line 22 of test/common/doctests/doctests_test.exs
  2. run just stop-test-db clean-symlinks compile test

Expected behavior The test should pass

Device (please complete the following information):