diff --git a/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy b/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy index bc4a7cd..2a1c2b6 100644 --- a/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy +++ b/src/ru/pulsar/jenkins/library/steps/GetExtensions.groovy @@ -78,7 +78,7 @@ class GetExtensions implements Serializable { localPathToExtension.copyFrom(new URL(extension.path)) } else { // If the path is a local file, copy the file - String localPath = getAbsolutePath(extension.path) + String localPath = getAbsolutePath(extension.path, env) FilePath localFilePath = FileUtils.getFilePath(localPath) localPathToExtension.copyFrom(localFilePath) } @@ -114,7 +114,7 @@ class GetExtensions implements Serializable { } } - private static String getAbsolutePath(String path) { + private static String getAbsolutePath(String path, def env) { // Если путь начинается с / или начинается с \\, или начинается с "Буквы диска" и ":"(Прим C:) то это абсолютный путь if (path.startsWith("/") || path.startsWith("\\\\") || path.matches("^[A-Za-z]:.*")) { return path