nodejs-fixdep: work properly when a package has no dependencies

This commit is contained in:
T.C. Hollingsworth 2013-05-06 14:34:09 -07:00
parent e0f6b9832c
commit d0c6d3a9e2
2 changed files with 5 additions and 2 deletions

View file

@ -32,7 +32,7 @@ if not os.path.exists('package.json~'):
md = json.load(open('package.json'))
if not md['dependencies']:
if 'dependencies' not in md:
md['dependencies'] = {}
if sys.argv[1] == '-r':

View file

@ -1,6 +1,6 @@
Name: nodejs
Version: 0.10.5
Release: 2%{?dist}
Release: 3%{?dist}
Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages
@ -188,6 +188,9 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
%{_defaultdocdir}/%{name}-docs-%{version}
%changelog
* Mon May 06 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-3
- nodejs-fixdep: work properly when a package has no dependencies
* Mon Apr 29 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-2
- nodejs-symlink-deps: make it work when --check is used and just
devDependencies exist