danger / danger

🚫 Stop saying "you forgot to …" in code review (in Ruby)
https://danger.systems
MIT License
5.47k stars 480 forks source link

Can't Create Plugins on Windows #1480

Closed retroandchill closed 9 months ago

retroandchill commented 9 months ago

Report

I am unable to create plugins in Windows. Attempting to do so will fail without a folder being created.

What did you do?

Run danger plugins create <name> from either CMD or Powershell

What did you expect to happen?

A new directory with the skeleton of the danger plugin was created

What happened instead?

No folder was created and the following was printed instead

[!] using template 'https://github.com/danger/danger-plugin-template'
[!] The exception involves the following plugins:
 -  claide-plugins

C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-plugins-0.9.2/lib/claide/executable.rb:51:in ``': No such file or directory - which git (Errno::ENOENT)
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-plugins-0.9.2/lib/claide/executable.rb:51:in `execute_command'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-plugins-0.9.2/lib/claide/executable.rb:27:in `block in executable'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-plugins-0.9.2/lib/claide/command/template_runner.rb:23:in `block in clone_template'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/cork-0.3.0/lib/cork/board.rb:184:in `section'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-plugins-0.9.2/lib/claide/command/template_runner.rb:20:in `clone_template'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-plugins-0.9.2/lib/claide/command/plugins/create.rb:51:in `run'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
        from C:/Users/<username>/.local/share/gem/ruby/3.2.0/gems/danger-9.4.2/bin/danger:5:in `<top (required)>'
        from C:/Users/<username>/AppData/Local/Microsoft/WindowsApps/danger:25:in `load'
        from C:/Users/<username>/AppData/Local/Microsoft/WindowsApps/danger:25:in `<main>'

Your Environment

My machine has Ruby and Danger installed using gem and Windows 11 is the OS in question.

orta commented 9 months ago

You might need to make claide support windows, it is using the command which - something I dont think is available on windows

manicmaniac commented 9 months ago

@retroandchill

Thank you for your report.

However the root cause is not in Danger code base. I will update claide-plugins after https://github.com/dbgrandi/claide-plugins/issues/4 is resolved.