mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-01-23 12:14:42 +02:00
Проверка на существование файла vrunner перед чтение его свойств
This commit is contained in:
parent
ba5bc457b6
commit
826d6bc62b
@ -31,6 +31,10 @@ class VRunner {
|
|||||||
static boolean configContainsSetting(String configPath, String settingName) {
|
static boolean configContainsSetting(String configPath, String settingName) {
|
||||||
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
IStepExecutor steps = ContextRegistry.getContext().getStepExecutor()
|
||||||
|
|
||||||
|
if (!steps.fileExists(configPath)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
String fileContent = steps.readFile(configPath)
|
String fileContent = steps.readFile(configPath)
|
||||||
return fileContent.contains("\"$settingName\"")
|
return fileContent.contains("\"$settingName\"")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user