Skip to content

Commit 0b16a6d

Browse files
Only replace ~/ for now
1 parent f7bc769 commit 0b16a6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ScaffoldPackageCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public function package( $args, $assoc_args ) {
7979
$package_dir = WP_CLI::get_runner()->get_packages_dir_path() . 'local/' . $assoc_args['name'];
8080
}
8181

82-
$package_dir = realpath( $package_dir );
82+
if ( '~/' === substr( $package_dir, 0, 2 ) && ( $home = getenv( 'HOME' ) ) ) {
83+
$package_dir = $home . substr( $package_dir, 1 );
84+
}
8385

8486
if ( empty( $assoc_args['homepage'] ) ) {
8587
$assoc_args['homepage'] = 'https://github.com/' . $assoc_args['name'];

0 commit comments

Comments
 (0)