Skip to content

Commit

Permalink
TOOLS-1082 mongorestore less verbose path error
Browse files Browse the repository at this point in the history
  • Loading branch information
lorepozo committed Jun 3, 2016
1 parent 29eca0f commit 0a8d4f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mongorestore/mongorestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (restore *MongoRestore) ParseAndValidateOptions() error {
} else {
restore.tempRolesCol = *restore.ToolOptions.HiddenOptions.TempRolesColl
}

if len(restore.OutputOptions.ExcludedCollections) > 0 && restore.ToolOptions.Namespace.Collection != "" {
return fmt.Errorf("--collection is not allowed when --excludeCollection is specified")
}
Expand Down Expand Up @@ -222,7 +222,7 @@ func (restore *MongoRestore) Restore() error {
}
target, err = newActualPath(restore.TargetDirectory)
if err != nil {
return fmt.Errorf("can't create ActualPath object from path %v: %v", restore.TargetDirectory, err)
return fmt.Errorf("mongorestore target '%v' invalid: %v", restore.TargetDirectory, err)
}
// handle cases where the user passes in a file instead of a directory
if !target.IsDir() {
Expand Down

0 comments on commit 0a8d4f5

Please sign in to comment.