question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optional inputs don't work

See original GitHub issue

If I run the deploy command with optional input values, I get always the error Too many arguments, expected arguments "command" "stage".

If I run this command from my local machine, everything works fine.

This is my configuration

- name: Deploy website
  uses: deployphp/action@v1.0.5
  with:
    private-key: ${{ secrets.SSH_PRIVATE_KEY }}
    known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
    dep: deploy ${{ steps.extract-branch.outputs.branch }} --composer_auth '${{ env.composer_auth }}'

And this is in my PHP file:

use Symfony\Component\Console\Input\InputOption;

option('composer_auth', null, InputOption::VALUE_OPTIONAL, 'Add a composer authentification configuration');

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
antonmedvcommented, Dec 3, 2020

Yes, looks like there can be a better solution with correct splitting in js code. Will implement it.

1reaction
jonnittocommented, Dec 19, 2020

Yeah, it works now as expected, thank you a lot 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why should Java 8's Optional not be used in arguments
Usually it is not the case. If not, I use Optional as argument types and/or field types. There are still grey areas, where...
Read more >
Optional parameters don't work · Issue #122 - GitHub
If I add constraint to route pattern for method ("[controller]/{id:int?}") it strats work again but only with supplied id value.
Read more >
passing optional parameters to controllers doesn't work
4 Bug(?): passing optional parameters to controllers doesn't work. Can anyone please verify this finding, which I consider a bug in Laravel 5.4:...
Read more >
Optional Input does not work - Grasshopper Developer
pManager[2].Optional = true;. However, my componenet still doesnt run. It gives me this error. Input parameter failed to collect data.
Read more >
Using Python Optional Arguments When Defining Functions
In this tutorial, you'll learn about Python optional arguments and how to define functions with default values. You'll also learn how to create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found