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

No warning on 404 #32

Open
tomek-he-him opened this issue Dec 2, 2014 · 11 comments
Open

No warning on 404 #32

tomek-he-him opened this issue Dec 2, 2014 · 11 comments
Milestone

Comments

@tomek-he-him
Copy link
Collaborator

Downloading from a github repo, try to make a typo in the reference – everything will pass smooth and error-less, yet the package isn't installed.

It would be great to:

  • see a warning if something goes wrong, and
  • see a summary at the end when things go right.
@till
Copy link

till commented May 2, 2015

@tomekwi Looks like the warning is there:

till:napa-playground/ $ ./node_modules/.bin/napa till/foobar-jsjsjd
info git git://github.com/till/foobar-jsjsjd into foobar-jsjsjd
ERR! fatal: remote error: 
  Repository not found.

Exit code is broken:

till:napa-playground/ $ echo $?
0

@tomek-he-him
Copy link
Collaborator Author

If I remember well I meant the reference – as in till/easybib-cookbooks#foobar-jsjsjd

@till
Copy link

till commented May 3, 2015

@tomekwi Ah, I see. I tried to do a patch for it, but I gave up yesterday. Got confused with the callbacks.

@caseyWebb caseyWebb self-assigned this Oct 29, 2015
@caseyWebb caseyWebb modified the milestone: 3.0.0 Oct 29, 2015
@caseyWebb
Copy link
Collaborator

@tomek-he-him
Copy link
Collaborator Author

Wow! Looks neat!

But @caseyWebb you know what I meant through reference don’t you? I meant napa 'jquery/jquery#revision-that-is-not-there'.

@caseyWebb
Copy link
Collaborator

I don't doubt that I'm misunderstanding, but the format in that screenshot is package@ref location/installed, simply because that's the way npm does it.

ex: https://www.dropbox.com/s/yzgxfd7dfd5kexb/Screenshot%202015-11-06%2013.19.13.png?dl=0

EDIT: I now realize that screenshot is confusing. nonexistent-branch is the literal name of the branch in this case. So w/ your example above, it would say fatal: couldn't find remote ref foobar-jsjsjd

@caseyWebb
Copy link
Collaborator

I'm totally ok with changing the format, though. I was aiming to make it as npm-like as possible.

@tomek-he-him
Copy link
Collaborator Author

When I try to install jquery/jquery#<reference>, npm v3.3.12 does the following:

$ npm install jquery/jquery\#master
…/
└── jquery@3.0.0-pre  extraneous (git://github.com/jquery/jquery.git#67fa2eab6ef323b1d894e9e7f054c6e8c844d304)

$ npm install jquery/jquery\#non-existent
npm ERR! git rev-list -n1 non-existent: fatal: ambiguous argument 'non-existent': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 non-existent: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 non-existent: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 non-existent: fatal: ambiguous argument 'non-existent': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 non-existent: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 non-existent: 'git <command> [<revision>...] -- [<file>...]'

# Keeps trying forever…

Whereas napa v2.0.0 pretends as if everything where alright:

$ napa jquery/jquery\#master
info download https://github.com/jquery/jquery/archive/master.tar.gz into jquery#master

$ napa jquery/jquery\#non-existent
info download https://github.com/jquery/jquery/archive/non-existent.tar.gz into jquery#non-existent

$ echo $?
0

@caseyWebb
Copy link
Collaborator

That above screenshot is speculative, not in any released version yet. I've been working on a pretty significant update that will make upgrading packages more npm-like. The branch this currently lives in is version-tracking, if you're interested.

@tomek-he-him
Copy link
Collaborator Author

Sounds great! Thanks for the clarification!

By the way, in my current projects I don’t need napa – so I won’t be contributing much in the near future.

But it’s great to see that this great project is alive again! Thanks, @caseyWebb!

@gvandyk-r7
Copy link

+1

@caseyWebb caseyWebb removed their assignment Mar 28, 2017
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

5 participants