Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Weird error when the target directory does not exist #153

Open
stof opened this issue Sep 21, 2016 · 1 comment
Open

Weird error when the target directory does not exist #153

stof opened this issue Sep 21, 2016 · 1 comment

Comments

@stof
Copy link
Contributor

stof commented Sep 21, 2016

When the target directory does not exist, I get an error with a message which does not explain at all the actual source of the error:

  [UnexpectedValueException]                                                   
  Cannot create phar '/home/stof/src/Incenteev/am-tools/build/am-tools.phar',  
   file extension (or combination) not recognised or the directory does not exist   

the config file looks like this:

{
    "alias": "am-tools.phar",
    "chmod": "0755",
    "compactors": [
        "Herrera\\Box\\Compactor\\Json",
        "Herrera\\Box\\Compactor\\Php"
    ],
    "directories": ["src"],
    "finder": [
        {
            "name": "*.php",
            "exclude": [
                "Tests",
                "tests"
            ],
            "in": "vendor"
        }
    ],
    "git-commit": "git-commit",
    "git-version": "git-version",
    "datetime": "build-date",
    "main": "am-tools",
    "output": "build/am-tools.phar",
    "stub": true
}

I suggest simply creating the directory if it does not exist

@theofidry
Copy link
Member

For reference this has been fixed in box-project/box#27

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants