Skip to content

[SHOPWARE] Fixed edge case where config/jwt/ folder is empty and shell expansion fails. #4101

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

null93
Copy link
Contributor

@null93 null93 commented Jul 30, 2025

I ran into an issue where the sw:writable:jwt task fails whenever the config/jwt folder does not contain any visible files.

From my understanding this is because shells by default do not have the "nullglob" option set. So when it tries to glob the config/jwt directory for files, it does not find any and returns the literal string containing the asterisk. This leads to the error you see below:

...
task sw:writable:jwt
[localhost]  error  in deploy.php on line 56:
[localhost] run cd /var/www/example.com/releases/2025-07-30-001 && chmod -R 660 config/jwt/*
[localhost] err chmod: cannot access 'config/jwt/*': No such file or directory
[localhost] exit code 1 (General error)

One way to fix this is to use the find command instead, which is the change I propose we merge in.


  • Bug fix (no issue opened)

  • New feature?

  • BC breaks?

  • Tests added?

  • Docs added?

    Please, regenerate docs by running next command:
    $ php bin/docgen
    

Fixed edge case where `config/jwt/` folder is empty and shell expansion fails.
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

Successfully merging this pull request may close these issues.

1 participant