-
Notifications
You must be signed in to change notification settings - Fork 19
Convert '~/' when supplied in $package_dir
#127
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
Conversation
|
@schlessera I'm not sure
Thoughts? |
|
Maybe use our own helper functions, something like this: https://3v4l.org/9Ga8c |
|
Drush uses this: https://github.com/webmozart/path-util |
|
As it's very Unixy could just do something like if ( '~/' === substr( $package_dir, 0, 2 ) && ( $home = getenv( 'HOME' ) ) ) {
$package_dir = $home . substr( $package_dir, 1 );
} |
|
@gitlost Yes, I suggested a more robust version of that here: https://3v4l.org/9Ga8c |
$package_dir through realpath() for consistent paths$package_dir
|
@schlessera @gitlost Updated. I went with the simpler approach to begin with. |
|
I'm not sure why you'd want to solve this partially only. It is highly probable someone will want to use a relative path with this as well, and just create a new bug report at that point. Additionally, having |
|
I don't see how a relative path or |
|
Oh, okay, I just assumed it would create issues as well. All good then. |
Convert '~/' when supplied in `$package_dir`
Fixes #119