You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is on my end or an actual issue ... this is the first time I'm using laravel zero.
It's really awesome and I quickly started making a simple CLI app that uses Youtube API.
So one of my commands has this at the beginning of the class:
classGetVideoCommandextendsCommand
{
/** * The signature of the command. * * @var string */protected$signature = 'get-video {id : the id of the video (required)}';
So if I do the following it works
./cliapp get-video MXDF0wVcWfA
However the following fails with a big red error message (turns out a lot of YouTube videoId's have a dash at the beginning):
./cliapp get-video -wPg1tNEWmo
The error message:
The "-w" option does not exist.
Unfortunately it seems the single or double quotes do not help:
The text was updated successfully, but these errors were encountered:
fabd
changed the title
Invalid parsing of arguments that start with a dash ?
Invalid parsing of an argument (not an option) that start with a dash ?
Nov 15, 2022
Hmm after Google'in around I see it can work like this :
./cliapp get-video -- -wPg1tNEWmo
Fair enough although I'm not sure why quoting the 'argument' shouldn't work to escape the parsing of the dash but then again I am not a bash/shell script expert so there may be good reasons for it.
Hey there
I'm not sure if this is on my end or an actual issue ... this is the first time I'm using laravel zero.
It's really awesome and I quickly started making a simple CLI app that uses Youtube API.
So one of my commands has this at the beginning of the class:
So if I do the following it works
However the following fails with a big red error message (turns out a lot of YouTube videoId's have a dash at the beginning):
The error message:
Unfortunately it seems the single or double quotes do not help:
Did I miss something obvious here?
The text was updated successfully, but these errors were encountered: