Skip to content

Commit

Permalink
use err.message (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
joehand authored Feb 1, 2017
1 parent ee69257 commit f837a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/commands/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
debug('Reading archive in dir', opts.dir)

Dat(opts.dir, opts, function (err, dat) {
if (err && err.indexOf('No existing') === -1) return exit(err)
if (err && err.message && err.message.indexOf('No existing') === -1) return exit(err)
else if (err || !dat.resumed) return exit('No existing archive. Please use `dat create` or `dat clone` first.')
if (dat.owner) debug('Archive owner, syncing local updates to network')
else debug('Not archive owner, syncing remote updates')
Expand Down

0 comments on commit f837a02

Please sign in to comment.