openfga / sdk-generator

OpenFGA Client SDK Generator
Apache License 2.0
14 stars 30 forks source link

fix(build): allow clearing of unwanted files to fail #285

Closed ewanharris closed 5 months ago

ewanharris commented 5 months ago

Description

On a clean run, the script wouldn't find any files to remove which meant the cd - would never run and put the script back into the top level directory. So, use || to ensure that we always run that and end up back in the context of the top level directory.

References

Closes #73

Review Checklist

ewanharris commented 5 months ago

Ha, this now breaks the second run 🤦🏻 . Putting into draft

rhamzeh commented 5 months ago

@ewanharris The failure is just shellcheck making sure you aren't doing something unintentional, so just adding brackets should be enough to make it work

ewanharris commented 5 months ago

@rhamzeh I'd not followed the error chain far enough along to determine it was grep failing, I've improved the check and moved it the grep call so this now works in clean and dirty states