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

Homebrew 3.1.2 upgrade issue #30

Closed
chenrui333 opened this issue Jun 5, 2019 · 20 comments
Closed

Homebrew 3.1.2 upgrade issue #30

chenrui333 opened this issue Jun 5, 2019 · 20 comments

Comments

@chenrui333
Copy link

Relates to Homebrew/homebrew-core#40673

Having issue with cash 10 usd eur pln and cash -key foo

$ /usr/local/Cellar/cash-cli/3.1.0/bin/cash 10 usd eur pln
/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58
				throw new Error('Project name could not be inferred. Please specify the `projectName` option.');
				^

Error: Project name could not be inferred. Please specify the `projectName` option.
    at new Conf (/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58:11)
    at Object.<anonymous> (/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/bin/cash.js:10:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/bin/index.js:9:14)
$ /usr/local/Cellar/cash-cli/3.1.0/bin/cash -key foo
/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58
				throw new Error('Project name could not be inferred. Please specify the `projectName` option.');
				^

Error: Project name could not be inferred. Please specify the `projectName` option.
    at new Conf (/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58:11)
    at Object.<anonymous> (/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/bin/cash.js:10:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/bin/index.js:9:14)
@xxczaki
Copy link
Owner

xxczaki commented Jun 9, 2019

Hi @chenrui333, sorry for the delay, but I was on holiday in Spain this week ;)

In 3.1.0 I added the API key validation, so the output of cash --key foo is now: Provided API key seems invalid, please try again! and not: 'Saved API key to [...]. To fix that, we can either change this line to:

assert_match "Provided API key seems invalid, please try again!"

or we can change the test command from cash --key foo to something like cash --key 11111111111111111111111111111111 and keep assert_match the same as before.

Let me know which option is better and I will open a pull request to the Homebrew repo 😄

@chenrui333
Copy link
Author

cool, welcome back!

I am outside now, I will check later tonight or tomorrow. Thanks for checking on this!

@chenrui333
Copy link
Author

Sorry for trying this late. It seems still not quite working.

I have directly called the command and get the following output:

$ /usr/local/Cellar/cash-cli/3.1.0/bin/cash --key 111111111111111111111111111111
/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58
				throw new Error('Project name could not be inferred. Please specify the `projectName` option.');
				^

Error: Project name could not be inferred. Please specify the `projectName` option.

@chenrui333
Copy link
Author

It also looks like there is no help cli option:

$  /usr/local/Cellar/cash-cli/3.1.0/bin/cash help
/usr/local/Cellar/cash-cli/3.1.0/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58
				throw new Error('Project name could not be inferred. Please specify the `projectName` option.');
				^

Error: Project name could not be inferred. Please specify the `projectName` option.

@xxczaki
Copy link
Owner

xxczaki commented Jun 26, 2019

Could you try it with the newest 3.1.1 version? Something was wrong with the conf module, but it's now updated, so everything should be working fine 😄

@chenrui333
Copy link
Author

Definitely, doing it now.

@chenrui333
Copy link
Author

chenrui333 commented Jun 27, 2019

Still had the same issue:
https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/44232/version=mojave/console

06:40:22 ==> /usr/local/Cellar/cash-cli/3.1.1/bin/cash --key foo
06:40:22 /usr/local/Cellar/cash-cli/3.1.1/libexec/lib/node_modules/cash-cli/node_modules/conf/index.js:58
06:40:22 				throw new Error('Project name could not be inferred. Please specify the `projectName` option.');
06:40:22 				^
06:40:22 
06:40:22 Error: Project name could not be inferred. Please specify the `projectName` option.

@chenrui333
Copy link
Author

@xxczaki ping. :)

@chenrui333 chenrui333 changed the title Homebrew 3.1.0 upgrade issue Homebrew 3.1.1 upgrade issue Jul 4, 2019
@xxczaki xxczaki closed this as completed in 2d568cc Jul 4, 2019
@xxczaki
Copy link
Owner

xxczaki commented Jul 4, 2019

@chenrui333 Ouch, I totally forgot about that! Well, after investigating this issue I realised, that adding a projectName to conf module options should fix our problem.

Just published 3.1.2 😄 Let me know if everything works now (and if not I will open an issue in the conf repository).

@xxczaki xxczaki reopened this Jul 4, 2019
@xxczaki
Copy link
Owner

xxczaki commented Jul 4, 2019

Sorry! Accidentally closed it 😆

@chenrui333
Copy link
Author

cool!, will try the new one, cheers!

@chenrui333 chenrui333 changed the title Homebrew 3.1.1 upgrade issue Homebrew 3.1.2 upgrade issue Jul 4, 2019
@chenrui333
Copy link
Author

chenrui333 commented Jul 4, 2019

@xxczaki Still failed :( (build ref: https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/44594/version=mojave/console)

07:21:13 ==> /usr/local/Cellar/cash-cli/3.1.2/bin/cash --key foo
07:21:13 Error: cash-cli: failed
07:21:13 An exception occurred within a child process:
07:21:13 Test::Unit::AssertionFailedError: <0> expected but was

@xxczaki
Copy link
Owner

xxczaki commented Jul 8, 2019

Hmm, error message doesn’t make much sense. Will look at it later today.

@xxczaki
Copy link
Owner

xxczaki commented Jul 21, 2019

@chenrui333 Hi, I created a pull request in the Homebrew/homebrew-core repository with changes I suggested in #30 (comment) . It passed the test.

I have no idea why it wasn't working when you tried it in the console.

What should we do?

@chenrui333
Copy link
Author

that is cool!! I will close my PR in favor of yours. :)

@chenrui333
Copy link
Author

I could remember the details, but it might be because i was just using your suggestion in 3.1.0, and now we are in 3.1.2. I will try to see if it works in my local though.

@chenrui333
Copy link
Author

yeah, it works in my local too.

@chenrui333
Copy link
Author

One thing you should do is to rename the commit and PR title as cash-cli: 3.1.2, and we are good to go. 🎉

@xxczaki
Copy link
Owner

xxczaki commented Jul 21, 2019

@chenrui333 done 😄

@chenrui333
Copy link
Author

Thanks a lot!! Closing my issue now.

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

No branches or pull requests

2 participants