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

PharPackageTask wrong format of path in webstub and/or clistub when building on Windows #809

Closed
gfaust-qb opened this issue Nov 28, 2017 · 0 comments
Milestone

Comments

@gfaust-qb
Copy link

gfaust-qb commented Nov 28, 2017

The documentation describes webstub and clistub in PharPackageTask as relative path in the phar-archive.
When building on a windows system this path is build in the windows-format with \ as directory separator. Using this phar-archive in a linux-environment fails with the message: src\cli.php not found.
In the generated stub.php (nearly) all paths have / as directory separator except the entries for webstub and clistub (or are replaced by OS-independent constant DIRECTORY_SEPARATOR).
Example:
<pharpackage basedir="./" destfile="./build/${phing.project.name}.phar" webstub="./src/web.php" clistub="src/cli.php">

Result (affected lines and correct lines from generated stub.php):
$web = 'src\web.php';
...
const START = 'src\sftp_sync.php';
...
if (!file_exists($temp . DIRECTORY_SEPARATOR . md5_file(__FILE__))) { self::_removeTmpFiles($temp, getcwd()); @mkdir($temp, 0777, true); @file_put_contents($temp . '/' . md5_file(__FILE__), '');

Edit: This affects all versions at least from 2.12.0

gfaust-qb added a commit to gfaust-qb/phing that referenced this issue Nov 28, 2017
gfaust-qb added a commit to gfaust-qb/phing that referenced this issue Nov 28, 2017
@mrook mrook added this to the 3.0 milestone Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants