do not attempt to save history to a blank filename

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Server Security
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As part of exit handling, the shell always calls shellHistoryDone(). However, there are some code paths that do not hit shellHistoryInit(); for such runs of the shell, the shell will output this message on exit:

      2017-09-13T10:30:28.490-0400 E -        [main] Error saving history file: FileOpenFailed: Unable to open() file : No such file or directory
      

      I can reproduce this by running the shell with this command and then pressing CTRL-C:

       ./mongo --nodb --eval "sleep(5000)" 
      

              Assignee:
              [DO NOT USE] Backlog - Security Team
              Reporter:
              Eric Milkie
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: