jenkinsci / plasticscm-plugin

A plugin for Jenkins to be able to use Plastic SCM
MIT License
16 stars 31 forks source link

FilePath(File()) does not respect the OS of the remote machine. #9

Closed electricmime closed 6 years ago

electricmime commented 6 years ago

I'm using a jenkins master running on windows, with slave that are windows, linux and iOS. 2.13 was the last plugin that worked with my setup, because the / was always getting messed up on the unix machines. Here is the fix I came up with.

File() is always run on the local machine (master) so any paths run through it would be converted to the OS of the master node. This was problematic when the remote and the master had different OS. Using FilePath(File) also converted based upon the OS of the master. This change uses FilePath(Channel, String) to use the channel to the remote server so that the path is correctly configured for the remote OS, irrespective of the master OS.

miryamGSM commented 6 years ago

Hi Ryan,

Thank you very much for the report and the fix :)

We will review and release it this week.

Best regards, Míryam