Hi!Has anyone had an issue where for the first time merge request for Infracost comment works fine but during the second time this error occurs?fatal: destination path '/tmp/base' already exists and is not an empty directory.Any tip would be appreciated.
08/18/2022, 7:28 AM
Hello! Based on our yesterday's discussion, it seems that your local machine already has
directory after the first run and it's not cleaned up
To mitigate that you could add a last step to the pipeline config to delete this directory
Usually the pipeline job is running in a container, so the directory is located in there, and we don't need to worry about the cleanup as the container gets discarded.
After the line with
infracost comment gitlab
command you can add a new line with something like
- rm -rf /tmp/base
as a last step
FYI, this folder is created on
step to pull your base branch - it is needed to create a baseline for comparison
08/18/2022, 8:19 AM
Looks like it worked in that form:
- Remove-Item -Recurse -Force /tmp/base
After the changes are made for existing merge request, will additional comment from Infracost appear?
08/18/2022, 8:20 AM
Oh, sorry, I guess Windows should have a different command 🙂
command has a
flag that supports 3 options:
is default. Update means it will update content of its latest comment