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

switch_to_project_root is too flaky #25

Open
dovilas opened this issue Oct 1, 2013 · 1 comment
Open

switch_to_project_root is too flaky #25

dovilas opened this issue Oct 1, 2013 · 1 comment

Comments

@dovilas
Copy link

dovilas commented Oct 1, 2013

I was having problems setting up a project in chrooted environment and silversmith CLI tool was complaining me I was running it from somewhere else than project root. I decided to look up why and found numerous issues with the switch_to_project_root function, which is also a cause for my original problem. Here's a list of issues listed in no particular order:

  • It fails to recognise project directory if it is in root (as in /project/<various silverstripe directories>)
  • The manual path constructing is a terrible idea and will fail in some corner cases.
  • Seeing that this is project directory for checking if some subdirectory contains cli-script.php is flaky to say at least.

I've no idea what version of framework is used though as there's no VERSION file and none of the CLI executables react to --version or version arguments.

@unclecheese
Copy link
Owner

Interesting! I had never considered projects living at the root directory. That should be supported for sure.

What is "manual path constructing?" And do you have a less terrible idea that you can offer?

As for the cli-script.php check, it's actually the most certain way to detect the framework directory. If you have any other ideas, I'm keen to hear them, but sake seems to me the least likely thing to change or be moved in future releases.

And forget about the VERSION fie.. Framework hasn't had a reliable version fie since before 2.4. Not sure what happened, but it is frustrating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants