diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e9a383..06eb335 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ This update introduces minor bug fixes & improvements ### Fixed - ncc will now correctly handle package execution where the main unit is not defined in the package instead of throwing an exception. + - Executable Compiler will now correctly create a directory if it does not exist when compiling a package using gcc diff --git a/src/ncc/Classes/PhpExtension/ExecutableCompiler.php b/src/ncc/Classes/PhpExtension/ExecutableCompiler.php index 2c6d2ce..94be0a0 100644 --- a/src/ncc/Classes/PhpExtension/ExecutableCompiler.php +++ b/src/ncc/Classes/PhpExtension/ExecutableCompiler.php @@ -84,6 +84,12 @@ $binary_path = ConstantCompiler::compileConstants($this->getProjectManager()->getProjectConfiguration(), $configuration->getOutput()); } + // Create the directory recursively if it does not exist + if(!is_dir(dirname($binary_path))) + { + mkdir(dirname($binary_path), 0777, true); + } + if($gcc_path === null) { throw new BuildException("Unable to find gcc executable, please make sure it is installed and in your PATH environment variable.");