mongo-utils icon indicating copy to clipboard operation
mongo-utils copied to clipboard

"Command failed :" [...] "too many positional arguments"

Open Ilshidur opened this issue 9 years ago • 1 comments

Running on Windows 10. I'm having the following error :

Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "mongorestore '--db' 'championgg' '--drop' './championweb/db/championgg/'" 2016-03-13T02:42:33.659+0100 too many positional arguments 2016-03-13T02:42:33.660+0100 try 'mongorestore --help' for more information

=> mongo-utils runs this command mongorestore '--db' 'championgg' '--drop' './championweb/db/championgg/ : it fails ("too many positional arguments").

The code creating the arguments (function "makeArgumentString") adds two additional single quotes for each one of them.

=> If I run mongorestore --db championgg --drop ./championweb/db/championgg/ (without the single quotes) : the command runs successfully.

How can I fix this problem ?

Ilshidur avatar Mar 13 '16 02:03 Ilshidur

+1

landorg avatar Apr 20 '17 20:04 landorg