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

brun returns invalid argument exception. Different results on 2 machines. #122

Open
forReason opened this issue Jun 22, 2022 · 4 comments
Open

Comments

@forReason
Copy link

Given the following file: passwordprotect.clsp:

(mod (
        password_hash
        password
        receive_puzzlehash
        transaction_amount
    )
    (defconstant CREATE_COIN 51)
    (if (= (sha256 password) password_hash)
        ; true - password was correct
        (list
            (list CREATE_COIN receive_puzzlehash transaction_amount)
        )
        ; false - password was incorrect
        (x "Bad password")
    )
)

brun throws an error on my machine (windows 10, powershell:

brun '(a (q 2 (i (= (sha256 11) 5) (q 4 (c 2 (c 23 (c 47 ()))) ()) (q 8 (q . "Bad password"))) 1) (c (q . 51) 1))' "(0x9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 test 0xa11ce 1000)"

image

same brun command works on another machine (in the video tutorial and for another community member) :
paste

@trepca
Copy link

trepca commented Aug 23, 2022

This is due to how Powershell handles double-quotes: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7.2

@forReason
Copy link
Author

well actually, I wouldnt consider this as resolved but as "workaround found" it is highly inconvenient in powershell with that

@forReason forReason reopened this Sep 5, 2022
@trepca
Copy link

trepca commented Sep 26, 2022

you'll need to file an issue with PowerShell to fix that, that's how they handle if double/single quotes are mixed

@forReason
Copy link
Author

its not that I wouldnt do that. From experience, Microsoft does not give a damn.
It only hurts the chir devs on windows i think. Its like shooting in the own knee.

Im running a virtual machine now to do that stuff. not the most comfortable way of doing things but meh.

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