scp-action icon indicating copy to clipboard operation
scp-action copied to clipboard

strip_components parameter no longer working in recent versions

Open Yuiffy opened this issue 8 months ago • 2 comments

Hi @appleboy,

Thank you for your great work on scp-action! I noticed that the strip_components parameter seems to no longer work as expected in the latest versions.

In previous versions (e.g., drone-scp version v1.6.14), strip_components worked properly, but after upgrading, it appears to have no effect. Here are the logs for comparison: (scp-action I use @master, so doesn't know is what version)

v1.8.0 log (not working as expected):

======= CLI Version Information =======
Drone SCP version 1.8.0
=======================================
drone-scp version: 1.8.0
tar all files into /tmp/yJVFbeBDFW.tar.gz
tar: Removing leading `/' from member names
remote server os type is unix
scp file to server.
Remove target folder: ~/Development/build-flutter-app
create folder ~/Development/build-flutter-app
untar file yJVFbeBDFW.tar.gz
remove file yJVFbeBDFW.tar.gz
===================================================
✅ Successfully executed transfer data to all host
===================================================

v1.6.14 log (working correctly):

drone-scp version: v1.6.14
tar all files into /tmp/mgEwsebBuj.tar.gz
tar: removing leading '/' from member names
remote server os type is unix
scp file to server.
Remove target folder: ~/Development/build-flutter-app
create folder ~/Development/build-flutter-app
untar file mgEwsebBuj.tar.gz
remove file mgEwsebBuj.tar.gz
===================================================
✅ Successfully executed transfer data to all host
===================================================

add: sorry, perhaps is not the strip issue, is the dir change. from

/github/workspace/

change to

/home/runner/work/(project-name)/(project-name)/

so strip: 2 not work, need strip: 5

Yuiffy avatar Apr 28 '25 03:04 Yuiffy

I will take it.

appleboy avatar Apr 28 '25 10:04 appleboy

Thank you @Yuiffy for the report, this confirms the issues we're seeing - as a temporary solution we targeted the v0.1.7 release until it's fixed @ master. :)

roos-robert avatar Apr 29 '25 21:04 roos-robert