Skip to content

Commit a3933b4

Browse files
committed
Fixes the method of determining a user's directory.
1 parent e5b9b69 commit a3933b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "am@jonesiscoding.com"
1010
}
1111
],
12-
"version": "1.6",
12+
"version": "1.7.1",
1313
"autoload": {
1414
"psr-4": {
1515
"DevCoding\\Mac\\": "src"
@@ -21,6 +21,7 @@
2121
"ext-posix": "*",
2222
"jonesiscoding/base-console": "^4.4",
2323
"phlak/semver": "^3.2",
24-
"symfony/process": "^4.4"
24+
"symfony/process": "^4.4",
25+
"symfony/yaml": "^4.4"
2526
}
2627
}

src/Objects/MacUser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class MacUser
88
{
99
use MacShellTrait;
1010

11-
const TEMPLATE_UDIR = '/Users/%s';
1211
const TEMPLATE_LIBRARY = '%s/Library';
1312

1413
/** @var int */
@@ -71,7 +70,7 @@ public function getDir()
7170
{
7271
if (empty($this->_dir))
7372
{
74-
$this->_dir = sprintf(self::TEMPLATE_UDIR, $this->getUserName());
73+
$this->_dir = $this->getShellExec('~' . $this->getUserName());
7574
}
7675

7776
return $this->_dir;

0 commit comments

Comments
 (0)