Skip to content
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

Mina fails miserably on Windows #660

Open
abhijitnandy opened this issue Apr 29, 2020 · 0 comments
Open

Mina fails miserably on Windows #660

abhijitnandy opened this issue Apr 29, 2020 · 0 comments
Labels
Milestone

Comments

@abhijitnandy
Copy link

Huge number of issues on Windows with this library, while running on Windows.

Considering that Windows is now a viable development environment even with it's own OpenSSH, I feel some of these issues should be fixed.

  1. ssh user doesn't get picked up from config

in the following file ignoring the entered config and instead picking up the ENV config value

\lib\mina\configuration.rb

    def fetch(key, default = nil)
      # value = ENV[key.to_s] || variables.fetch(key, default)
      value = variables.fetch(key, default) || ENV[key.to_s]
      value.respond_to?(:call) ? value.call : value
    end
  1. ssh shell command not quoted correctly

in the following file, the shell command needs to be in escaped double quotes

\tasks\mina\default.rb

desc 'Open an ssh session to the server and cd to deploy_to folder'
task :ssh do
  # exec %{#{Mina::Backend::Remote.new(nil).ssh} 'cd #{fetch(:deploy_to)} && exec $SHELL'}
  exec %{#{Mina::Backend::Remote.new(nil).ssh} \"cd #{fetch(:deploy_to)} && exec $SHELL\"}
end

Could not proceed after this as no other commands worked.

This gives a blank output -

mina setup

And this command -

mina deploy

gives some weird output like this -

mina aborted!
TypeError: no implicit conversion of nil into String

I can't believe that there is no proper error rescue even. So giving up and trying some other alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants