Error since 1.0.11 with optional inputs
With the update 1.0.11 the split function call was removed and because of that, optional inputs doesn't work anymore. (See issue #3)
This is strange.
As https://github.com/deployphp/action/blob/c9109f14cfed62baa499bbfdbd8f05620b1438c3/index.js#L72 not using split any more. It should be as in normal shell.
I've the dep command deploy ${{ env.BRANCH_NAME }} --no-interaction --composer_auth ${{ env.composer_auth }}
composer_auth is something like http-basic.composer.domain.tld USER PASSWORD and is added via option('composer_auth', null, InputOption::VALUE_OPTIONAL, 'Add a composer authentification configuration');
The error is still Too many arguments, expected arguments "command" "stage".
https://github.com/jonnitto/Uberspace.Deployer/blob/main/config.php#L9
Add quotas around “ ${{ env.composer_auth }}”.
This was before. Fails the same way
I don’t see how it’s the same issue.
This is the complete error message:
In ArgvInput.php line 171:
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command" "stage".
Exception trace:
at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Input/ArgvInput.php:171
Symfony\Component\Console\Input\ArgvInput->parseArgument() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Input/ArgvInput.php:82
Symfony\Component\Console\Input\ArgvInput->parse() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Input/Input.php:55
Symfony\Component\Console\Input\Input->bind() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Command/Command.php:214
Symfony\Component\Console\Command\Command->run() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Application.php:924
Symfony\Component\Console\Application->doRunCommand() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/src/Console/Application.php:133
Deployer\Console\Application->doRunCommand() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Application.php:265
Symfony\Component\Console\Application->doRun() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/vendor/symfony/console/Application.php:141
Symfony\Component\Console\Application->run() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/src/Deployer.php:326
Deployer\Deployer::run() at phar:///home/runner/work/RepoName/RepoName/deployer.phar/bin/dep:136
require() at /home/runner/work/RepoName/RepoName/deployer.phar:4
deploy [-p|--parallel] [-l|--limit LIMIT] [--no-hooks] [--log LOG] [--roles ROLES] [--hosts HOSTS] [-o|--option OPTION] [--] [<stage>]
Error: Failed: dep deploy staging --no-interaction --composer_auth "***"
This is really strange as
dep deploy staging --no-interaction --composer_auth "***"
It should work here as well.
Please try to use index.js locally to test if execa.command works as expected.
I have the same issue since I'm using multiple custom options for deploy.
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments to "deploy" command, expected arguments "stage".
Is there any solution for this ?