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

powershell function for SHA256 generates error #14

Open
washuu opened this issue Jul 26, 2018 · 2 comments
Open

powershell function for SHA256 generates error #14

washuu opened this issue Jul 26, 2018 · 2 comments

Comments

@washuu
Copy link

washuu commented Jul 26, 2018

===> Searching for: SSH::LibSSH
===> Searching for missing dependencies: Concurrent::Progress
===> Searching for missing dependencies: Test::Scheduler
===> Building: SSH::LibSSH
At line:1 char:192
+ ... )) -replace \"-\",\"\" } get-sha256 C:\Users\rstanilewicz\.zef\store\p6-ssh-libs ...
+                    ~
You must provide a value expression on the right-hand side of the '-' operator.
At line:1 char:192
+ "function get-sha256 { param($file);[system.bitconverter]::tostring([System.Secu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '\",\"\" } get-sha256 C:\Users\rstanilewicz\.zef\store\p6-ssh-libssh.git\926d72092eb9c9757f15f3095ecda
45553193bc9\resources\ssh.dll"' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ExpectedValueExpression

Effective index out of range. Is: -1, should be in 0..^Inf
  in method build at C:\Users\rstanilewicz\.zef\store\p6-ssh-libssh.git\926d72092eb9c9757f15f3095ecda45553193bc9\Build.p
m line 22
  in block <unit> at -e line 1 

it is because over-escaped slashes in $HOME.zef\store\p6-ssh-libssh.git\926d72092eb9c9757f15f3095ecda45553193bc9\Build.pm. Please replace

 -replace \"-\",\"\" 

with

-replace "-",""
@washuu
Copy link
Author

washuu commented Jul 26, 2018

or please ditch the "replace" option altogether, and put the hashes with "-" characters - the most compatible option...

BTW: my PowerShell version is 3.0.

@jnthn
Copy link
Collaborator

jnthn commented Jul 26, 2018

The line that needs changing is probably here. I'm not in a position to do/test this change at the moment, but if you are able to do so and submit a PR, I can merge it. (Otherwise, will have to wait a week or so after vacation.) Thanks!

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

No branches or pull requests

2 participants