Skip to content

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.
@antonmedv antonmedv merged commit 7c66ff4 into deployphp:master Oct 28, 2025
6 checks passed
@null93
Copy link
Contributor Author

null93 commented Oct 28, 2025

@antonmedv Thanks for taking the time to merge this one in, much appreciated!

@null93 null93 deleted the patch-2 branch October 28, 2025 14:14
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.

2 participants