These are chat archives for composer/composer

7th
Dec 2018
Phiter Fernandes
@phiter
Dec 07 2018 12:13
hey guys
I have a custom composer script that generates a file, and this command has an argument
After the file is created, I have to run chmod too, so I have this
"create" : [
            "@phinx create --template=MigrationTemplate.php.dist",
            "@unlock"
        ],
whatever argument I pass to create is passed tothe first function but also to the @unlock one, which is the one that runs chmod
is there a way to make it not pass the argument to @unlock?
Phiter Fernandes
@phiter
Dec 07 2018 12:21
Ok I found a way to ignore it
"create" : [
            "@phinx create --template=MigrationTemplate.php.dist",
            "@unlock"
        ],
        "unlock" : "chmod -R 777 db/migrations && :",
I put && colon after the chmod so anything after it is ignored
Ben Johnson
@cbj4074
Dec 07 2018 14:35
@phiterf That's a creative solution. Thanks for sharing. :) That behavior seems odd in the first place.