Closed tomcruise81 closed 3 years ago
And you have validated that the C:\Users\[USERNAME]\.conjurrc
does exist?
I also agree that we will need to include the filepath.FromSlash()
comment.
Will test in my lab.
Thanks for using the cybr-cli
!
@tomcruise81 Can you take a look at PR #99 and give it a test. This should resolve your issue. If it does, I'll go ahead and squash and merge it for staging to release in v0.1.2-beta.
Thanks!
@AndrewCopeland - no it doesn't exist. My assumption was that you'd utilize the information I provided to create one if one doesn't exist.
@infamousjoeg - I've tested the code and found one additional change that is needed. Wherever you have:
answer := strings.Replace(text, "\n", "", -1)
you'll need to change it to something like:
answer := strings.TrimSpace(text)
to deal with Windows including "\r\n" on STDIN
Thanks!
Good to know thats how strings.TrimSpace()
behaves, I have made the proposed changes.
Looks like it might be tied to https://github.com/infamousjoeg/cybr-cli/blob/main/pkg/cybr/conjur/netrc.go#L24 and the fact that it's not including a call to
filepath.FromSlash(...)
, though you could also put a normalizing call to it right before https://github.com/infamousjoeg/cybr-cli/blob/main/pkg/cybr/conjur/conjurrc.go#L111.