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

deptrac fails if user hase no write permission on the binary #173

Closed
leonboot opened this issue Jun 28, 2018 · 0 comments
Closed

deptrac fails if user hase no write permission on the binary #173

leonboot opened this issue Jun 28, 2018 · 0 comments
Labels

Comments

@leonboot
Copy link

If deptrac is being executed by a user who has no write permissions on the actual deptrac binary, the following exception is being thrown:

Fatal error: Uncaught Humbug\SelfUpdate\Exception\FilesystemException: The current phar file is not writeable and cannot be replaced: /usr/local/bin/deptrac. in phar:///usr/local/bin/deptrac/vendor/padraic/phar-updater/src/Updater.php:438
Stack trace:
#0 phar:///usr/local/bin/deptrac/vendor/padraic/phar-updater/src/Updater.php(101): Humbug\SelfUpdate\Updater->setLocalPharFile('/usr/local/bin/...')
#1 [internal function]: Humbug\SelfUpdate\Updater->__construct(NULL, false)
#2 phar:///usr/local/bin/deptrac/vendor/symfony/dependency-injection/ContainerBuilder.php(1159): ReflectionClass->newInstanceArgs(Array)
#3 phar:///usr/local/bin/deptrac/vendor/symfony/dependency-injection/ContainerBuilder.php(1266): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array)
#4 phar:///usr/local/bin/deptrac/vendor/symfony/dependency-injection/ContainerBuilder.php(1221): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices(Object(Symfony\Compo in phar:///usr/local/bin/deptrac/vendor/padraic/phar-updater/src/Updater.php on line 438

Does the self-update mechanism perhaps trigger on every execution? This wasn't an issue before. Our last CI build from one week ago (June 21) ran fine, new builds fail because of this error. In our case, deptrac is being ran within a prepared Docker container, where /usr/local/bin/deptrac is root-owned and the UID running the tool is the UID of our Jenkins user.

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

Successfully merging a pull request may close this issue.

2 participants