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

NEAR_HELPER_ACCOUNT env var contains garbage strings in the suggestion. #32

Closed
a1akris opened this issue Dec 29, 2022 · 0 comments · Fixed by #33 · May be fixed by #40
Closed

NEAR_HELPER_ACCOUNT env var contains garbage strings in the suggestion. #32

a1akris opened this issue Dec 29, 2022 · 0 comments · Fixed by #33 · May be fixed by #40

Comments

@a1akris
Copy link
Contributor

a1akris commented Dec 29, 2022

That's what the script suggested me to export as a NEAR_HELPER_ACCOUNT env var:

export NEAR_HELPER_ACCOUNT="\"ed25519:2ykcMLiM7vCmsSECcgfmUzihBtNdBv7v2CxNi94sNt4R8ar4xsrMMYvtsSNGQDfSRhNWXEnZvgx2wzS9ViBiS9jW\"})
ed25519:2ykcMLiM7vCmsSECcgfmUzihBtNdBv7v2CxNi94sNt4R8ar4xsrMMYvtsSNGQDfSRhNWXEnZvgx2wzS9ViBiS9jW"})
test.near"

The issue is exec-output.log contains multiple strings with the account_id:

❯ cat exec-output.log  | grep account_id
> print "Indexer launched with struct(private_rpc_url = struct(ip_address = \"indexer-node\", p
ath = \"\", port_number = 3030, protocol = \"http\"), public_rpc_url = struct(ip_address = \"12
7.0.0.1\", path = \"\", port_number = 8332, protocol = \"http\"), validator_key = {\"account_i
\": \"test.near\", \"public_key\": \"ed25519:3Kuyi2DUXdoHgoaNEvCxa1m6G8xqc6Xs7WGajaqLhNmW\", \"
secret_key\": \"ed25519:2ykcMLiM7vCmsSECcgfmUzihBtNdBv7v2CxNi94sNt4R8ar4xsrMMYvtsSNGQDfSRhNWXEn
Zvgx2wzS9ViBiS9jW\"})"
Indexer launched with struct(private_rpc_url = struct(ip_address = "indexer-node", path = "", p
ort_number = 3030, protocol = "http"), public_rpc_url = struct(ip_address = "127.0.0.1", path =
 "", port_number = 8332, protocol = "http"), validator_key = {"account_id": "test.near", "publi
c_key": "ed25519:3Kuyi2DUXdoHgoaNEvCxa1m6G8xqc6Xs7WGajaqLhNmW", "secret_key": "ed25519:2ykcMLiM
7vCmsSECcgfmUzihBtNdBv7v2CxNi94sNt4R8ar4xsrMMYvtsSNGQDfSRhNWXEnZvgx2wzS9ViBiS9jW"})
		"account_id": "test.near",

I fixed that by inserting tail -1 after grep in this line:

cat "${package_output_filepath}" | grep "${property_name}" | awk '{print $NF}' | sed 's/^"//' | sed 's/",*$//'

However, there may be a better solution that fixes the actual regexp.

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