Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape directory paths in installHelpers.js #1797

Closed
MarkWestside opened this issue Nov 25, 2017 · 5 comments
Closed

Escape directory paths in installHelpers.js #1797

MarkWestside opened this issue Nov 25, 2017 · 5 comments
Assignees
Labels
S: merged Completed, reviewed, and merged issues T: bug

Comments

@MarkWestside
Copy link

MarkWestside commented Nov 25, 2017

Failed to create master tenant

Hello everyone,

I am trying to install Adapt and can’t figure out the problem. Node and Mongo are working for me on other projects.

When I run the install with the same settings again, I get the following message:
Tenant 'master' already exists, automatic install cannot continue.
So is there a problem with setting up the database?

Could someone help me with the installation?

Best regards

Expected Behaviour

Install without errors

Actual Behaviour

After setting the display name for the tenant during the initial installation, the following error occurs:
ERROR: fatal: Too many arguments.

Steps to Reproduce

  1. Installed Node.js, MongoDB, FFmpeg and Grunt
  2. Cloned Adapt authoring tool
  3. Installed required packages
  4. Ran install script
  5. Used default settings except for FFmpeg
  6. Entered display name for tenant
  7. ERROR: fatal: Too many arguments. (usage: git clone [<options>] [--] <repo> [<dir>])
  8. Failed to create master tenant. Please check the console output.

Versions

  • Authoring Tool Version: 0.4.0
  • Operating System: macOS 10.13.1
  • Node.js: 6.11.3
  • MongoDB: 3.4.10
  • FFmpeg: 3.4
  • Grunt: 0.4.5
  • Grunt CLI: 1.2.0
  • Git: 2.13.6
@homostellaris
Copy link

Workaround

Hi @MarkWestside, the problem for me was that the path to the directory I had done the original clone of
this repo in had a space in it, e.g. /home/dan/The Laboratory/adapt_authoring. Clone it somewhere else and re-try the installation, e.g. /home/dan/adapt_authoring.

More detail about the problem

This can be fixed by escaping the path. The git clone command in installHelpers.js passes an argument for the directory which for me was /home/dan/The Laboratory/adapt_authoring/temp/5a31a1543aebf8a1647ef504/adapt_framework. The space in The Laboratory makes the git executable think that is the beginning of another argument, which is invalid syntax. I'm sure there is an NPM package that will escape paths in a cross-platform manner, I may create a PR at the weekend if I have time but its unlikely.

@MarkWestside
Copy link
Author

MarkWestside commented Dec 13, 2017

Great, that did the job. I did had a space in one of the folder names.

Thanks a lot, @moderatemisbehaviour!

@homostellaris
Copy link

@taylortom may I ask why this has been closed? The problem still exists.

@taylortom
Copy link
Member

Apologies, interpretated this as a non-at issue.

@taylortom taylortom reopened this Dec 14, 2017
@taylortom taylortom changed the title Install problem [macOS]: Failed to create master tenant / ERROR: fatal: Too many arguments Escape directory paths in installHelpers.js Dec 14, 2017
@taylortom taylortom added this to the 0.4.1 Bugfixes milestone Dec 14, 2017
@homostellaris
Copy link

@taylortom nice one, thanks for the fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: merged Completed, reviewed, and merged issues T: bug
Projects
None yet
Development

No branches or pull requests

4 participants