awalsh128 / cache-apt-pkgs-action

Cache APT packages in GitHub Actions
Other
205 stars 35 forks source link

cut binary path in ubuntu image is different from pre cache script #28

Closed rlardy-ulule closed 2 years ago

rlardy-ulule commented 2 years ago

Problem

Hi, I tried to use this action to install packages but it throws me an error because the cut command declared here is different from the one set up in the ubuntu-18.04 image I use for my workflows.

When I run command -v cut inside my workflow it displays this : /usr/bin/cut instead of /bin/cut

Solution

Add the $(command -v cut) in the pre_cache_action.sh instead of /bin/cut to ensure that the binary will always be called from the correct path no matter the distro.

PeterBowman commented 2 years ago

This was fixed in https://github.com/awalsh128/cache-apt-pkgs-action/pull/17 for v1.0.2, but it's still there at v1.0.3.

awalsh128 commented 2 years ago

Apologies. This was a regression due to sync'ng branches. I fixed and rerolled this into a new v1.0.3

rlardy-ulule commented 2 years ago

It works now, thanks a lot !