Spaces in command line arguments to golang tools break parsing on windows

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.7.8
    • Affects Version/s: None
    • Component/s: Tools
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      See

      http://buildlogs.mongodb.org/MCI_windows-64-2k8/builds/111407/test/tool_0/dumprestore7.js
      http://buildlogs.mongodb.org/MCI_windows-64-2k8/builds/111407/test/tool_0/exportimport4.js
      http://buildlogs.mongodb.org/MCI_windows-64-2k8/builds/111407/test/tool_0/exportimport5.js

      The spaces in the value passed to the --query argument to the tools are breaking command-line parsing.

      This is probably because of an escaping issue on windows where

      "{""ts"":{""$gt"":{""$timestamp"" : {""t"":1412692831,""i"":21 }}}}"
      

      becomes

      "{\"ts:{$gt:{$timestamp", ":", "{t:1412692831,i:21", "}}}}
      

      when it is read in by golang's flag parsing library.

            Assignee:
            sam.helman@10gen.com
            Reporter:
            sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: