Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Change auto home detection for windows #28

Closed
wants to merge 1 commit into from

2 participants

Daniel Holmes Jeremy Lindblom
Daniel Holmes

If including the sdk without a config.inc.php, there is some auto detection of home directories.

Running cd ~ && pwd on Windows though doesn't work and outputs "The system cannot find the path specified."

Daniel Holmes danielholmes Change auto home detection for windows - running `cd ~ && pwd` doesn'…
…t work and outputs "The system cannot find the path specified."
e0c3c2f
Jeremy Lindblom
Owner

Thanks, we'll see about getting this in soon.

Jeremy Lindblom
Owner

I have incorporated this change into my development branch. I will close this pull request when we release a version that contains this change.

Jeremy Lindblom
Owner

Completed in 1.5.7.

Jeremy Lindblom jeremeamia closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 18, 2012
  1. Daniel Holmes

    Change auto home detection for windows - running `cd ~ && pwd` doesn'…

    danielholmes authored
    …t work and outputs "The system cannot find the path specified."
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 2 deletions.
  1. +10 −2 sdk.class.php
12 sdk.class.php
View
@@ -1405,10 +1405,18 @@ public static function autoloader($class)
}
elseif (!isset($_ENV['HOME']) && !isset($_SERVER['HOME']))
{
- $_ENV['HOME'] = `cd ~ && pwd`;
+ $os = strtolower(PHP_OS);
+ if (in_array($os, array('windows', 'winnt', 'win32')))
+ {
+ $_ENV['HOME'] = false;
+ }
+ else
+ {
+ $_ENV['HOME'] = `cd ~ && pwd`;
+ }
if (!$_ENV['HOME'])
{
- switch (strtolower(PHP_OS))
+ switch ($os)
{
case 'darwin':
$_ENV['HOME'] = '/Users/' . get_current_user();
Something went wrong with that request. Please try again.