Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm version should work in a git directory w/o git #6528

Merged
merged 1 commit into from
Oct 21, 2014

Conversation

terinjokes
Copy link
Contributor

If a package seemed to be located in a git directory (for example, if it
was alongside a ".git" directory), but the user did not have git on
their path, npm would throw a cryptic error about calling trim on
undefined.

With this patch, npm will log that git was not found, and that tagging
the version was skipped, but otherwise go on to updating the
package.json file.

This was probably primarily felt by Windows users, where git might be
located within a GUI client, but would be using npm from the command
prompt.

If a package seemed to be located in a git directory (for example, if it
was alongside a ".git" directory), but the user did not have git on
their path, npm would throw a cryptic error about calling trim on
undefined.

With this patch, npm will log that git was not found, and that tagging
the version was skipped, but otherwise go on to updating the
package.json file.

This was probably primarily felt by Windows users, where git might be
located within a GUI client, but would be using npm from the command
prompt.
@othiym23 othiym23 merged commit 80b368f into master Oct 21, 2014
@othiym23 othiym23 added this to the 2.1.6 milestone Oct 21, 2014
@othiym23 othiym23 deleted the version-handle-enogit branch October 21, 2014 04:48
@othiym23
Copy link
Contributor

Thank you, @terinjokes! Also thank you for including a test!

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 80b368f on version-handle-enogit into * on master*.

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

Successfully merging this pull request may close these issues.

None yet

3 participants