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

Phar refers to wrong bin directory #343

Open
generalredneck opened this issue Apr 11, 2024 · 1 comment
Open

Phar refers to wrong bin directory #343

generalredneck opened this issue Apr 11, 2024 · 1 comment

Comments

@generalredneck
Copy link

Composer Info

composer --version
Composer version 2.7.1 2024-02-09 15:26:28

PHP Info

PHP 8.2.17 (cli) (built: Mar 16 2024 08:42:08) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.17, Copyright (c), by Zend Technologies

To Reproduce
The command run to produce the error:

wget https://github.com/drutiny/drutiny/releases/download/3.6.0/drutiny-3.6.0-php8.2.6.phar
mv drutiny-3.6.0-php8.2.6.phar drutiny
drutiny list

Error output

PHP Warning:  mkdir(): phar error: cannot create directory "phar:///home/allan/.local/bin/drutiny/.cache", write operations disabled in phar:///home/allan/.local/bin/drutiny/src/Kernel.php on line 98

                                                                                                                        
 [ERROR] 3.6.0 (2023-06-05 20:29:58 UTC) already exists at /home/allan/.drutiny/releases/3.6.0 (2023-06-05 20:29:58 UTC)
         but doesn't have a known callable drutiny bin. Expecting /home/allan/.drutiny/releases/3.6.0 (2023-06-05       
         20:29:58 UTC)/vendor/bin/drutiny.   

Expected behavior
It looks like it's trying to use the vendor/bin folder for the bin folder, however, the bin is actually in bin since /home/allan/.drutiny/releases/3.6.0 (2023-06-05 20:29:58 UTC) is a clone of the project and not a composer dependency.

@fiasco
Copy link
Contributor

fiasco commented Apr 11, 2024

Looks like you're using this library directly which is not recommended. Typically this library as a core for other libraries like https://github.com/drutiny/acquia. You could otherwise build from source and not use the phar release.

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

No branches or pull requests

2 participants