reactioncommerce / reaction-cli

A command line tool for working with Reaction Commerce.
33 stars 20 forks source link

Can't deploy on windows 10 - Missing slashes in identity file location #54

Closed nolanzandi closed 6 years ago

nolanzandi commented 6 years ago

I'm attempting to run the rection-cli deploy command on windows 10. I have four apps that I've tried with. below is also my reaction -v output:

image

Most commands work fine, including app create. But when I deploy any app I get this output:

image

As you can see, it doesn't interpret the location of its own Identity file (that the CLI created itself) properly. It seems to skip all the slashes ( I can confirm that the identity file exists in the location it's trying to reach, if it had properly put in the slashes). It looks like a problem in the ssh.js file, but I couldn't get it working. Any help would be great.

And I did confirm that this works fine on Linux.

jshimko commented 6 years ago

Can you please run the failing command(s) with debug on?

REACTION_CLI_DEBUG=true reaction deploy --app <your-app>

(and share the output)

nolanzandi commented 6 years ago

It didn't appear to work. Is it supposed to be an environment variable on the app instead?

image

jshimko commented 6 years ago

Oh sorry, Windows...

The problem is setting the environment variable. Windows apparently doesn't support inlining it like that. Do this instead...

set REACTION_CLI_DEBUG=true

reaction deploy --app yourapp
nolanzandi commented 6 years ago

image

jshimko commented 6 years ago

Ok, sorry for the wait. Finally figured out what it was. As you know, Windows obviously uses a \ in the directory paths and Mac/Linux uses /. Our CLI was properly accounting for that and generating the correct path to your SSH key with \'s in it. However, git requires a hybrid of the two when defining paths in its config.

So this (which is a proper Windows absolute path syntax)...

C:\Users\myname\something

Needs to be this for git to interpret it correctly...

C:/Users/myname/something

So yeah, a hybrid of Windows/Unix path styles. How lovely of git to do that for us!

As for the slashes missing in the path in your error, that's because on any non-Windows machine those slashes are used for escaping the next character in a string (which made git not even see them and just concatenate the entire path). So while git clearly works on Windows, it appears to partially operate as if it's on Linux/Mac.

Good times! Fix coming shortly in reaction-cli.

jshimko commented 6 years ago

@nolanzandi This has been fixed in reaction-cli v0.25.0. To update...

npm i -g reaction-cli@0.25.0

Please give it a test and let me know if it solves your issue.

brent-hoover commented 6 years ago

I tested this on Windows and it was working for me so closing.