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

Error on update command #2

Open
markitosgv opened this issue Jan 23, 2015 · 1 comment
Open

Error on update command #2

markitosgv opened this issue Jan 23, 2015 · 1 comment

Comments

@markitosgv
Copy link

Hi,

I´ve got this error when i try to update bidla update:

[Herrera\Json\Exception\FileException]                                                                                                                                                
  file_get_contents(phar:///usr/local/bin/bidla/vendor/herrera-io/phar-update/src/lib/../../res/schema.json): failed to open stream: phar error: "vendor/herrera-io/phar-update/res/sc  
  hema.json" is not a file in phar "/usr/local/bin/bidla"

My command update class is:

class UpdateCommand extends Command
{
    const MANIFEST_FILE = 'http://gesdinet.github.io/bidla/manifest.json';

    protected function configure()
    {
        $this
            ->setName('update')
            ->setDescription('Updates bidla.phar to the latest version')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $manager = new Manager(Manifest::loadFile(self::MANIFEST_FILE));
        $manager->update($this->getApplication()->getVersion(), true);
    }
}

My manifest.json file:

[
  {
    "name": "bidla.phar",
    "sha1": "4090c98fa2ea644412d899e20bab36a76095b088",
    "url": "http://gesdinet.github.io/bidla/download/bidla.phar",
    "version": "1.0.1"
  }
]

I dont know which is the problem

@kreitje
Copy link

kreitje commented Feb 10, 2015

The schema.json file was not added to the phar.

Use box.json I have this:

{
    "chmod": "0755",
    "directories": [
        "src"
    ],
    "files": [
        "vendor/herrera-io/phar-update/res/schema.json"
    ],
    "finder": [
        {
            "name": "*.php",
            "exclude": ["Tests"],
            "in": "vendor"
        }
    ],
    "git-version": "package_version",
    "main": "bin/my-app",
    "output": "my-app.phar",
    "stub": true
}

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