akoutmos / doctor

Ensure that your Elixir project documentation is healthy
MIT License
178 stars 15 forks source link

Make Doctor installable as an escript executable #59

Closed dmarcoux closed 1 year ago

dmarcoux commented 1 year ago

I reproduced what is done in https://github.com/nccgroup/sobelow. This can be tested with mix escript.install github dmarcoux/doctor branch escript.

dmarcoux commented 1 year ago

This isn't working due to the module Mix.Task missing when the escript executable is executed. This is the error I'm getting:

** (UndefinedFunctionError) function Mix.Task.recursing?/0 is undefined (module Mix.Task is not available)
    Mix.Task.recursing?()
    (doctor 0.21.0) lib/mix/tasks/doctor.ex:147: Mix.Tasks.Doctor.load_config_file/1
Warning:     (doctor 0.21.0) lib/mix/tasks/doctor.ex:55: Mix.Tasks.Doctor.run/1
    (elixir 1.14.2) lib/kernel/cli.ex:131: anonymous fn/3 in Kernel.CLI.exec_fun/2

Maybe someone knows how to fix this.