fop_console icon indicating copy to clipboard operation
fop_console copied to clipboard

Unknown option "employee"

Open leup opened this issue 2 years ago • 4 comments

PrestaShop version(s)

1.7.

Php version

7.2

Fop Console version

dev

Operating system

linux

command

No response

Describe the bug

Hello everyone,

I may have misused the cli command but I did not succeed to use the employee option as defined here:

https://github.com/friends-of-presta/fop_console/blob/73e57c9b0cea7c356d1e574ad1ed65a7a78731ee/src/Command.php#L41

I tried -em, --em, --employee to no avail.

What I found was that the option seems to be configured too late in the process. The "option not found" was emitted before entering the initialize method.

So I had to move it to configure() as such:

    protected function configure()
    {
        $this->addOption('employee', null, InputOption::VALUE_REQUIRED, 'Specify employee context (id).', null);

        parent::configure();
    }

(I also removed the shortcut because at first I thought it was the issue)

Did I misused the option or is this a real bug ?

leup avatar Jul 06 '22 11:07 leup

Anyone ? :)

leup avatar Jul 27 '22 00:07 leup

@friends-of-presta/fop-console-contributors anyone ?

SebSept avatar Aug 01 '22 13:08 SebSept

Hi, I can check it next week, not before, sorry.

tom-combet avatar Aug 01 '22 14:08 tom-combet

Very sorry for the late answer, I replied here.

tom-combet avatar Sep 21 '22 15:09 tom-combet