I have the following groovy cod to display in Active Choice Parameter some folder names and if the folder contains the ".a7" file display the file, if not,should post a error message. My problem is that my cod don't display the error message if the folder "a7.nativ" is missing and implicit the path to ".a7" file(/mnt/a7/v5.5/a7.nativ/v5.5/55.a7) is interrupted. Can somebody help me please? This is the cod:
Build=[] path2 = "/mnt/cc7/v5.5/a7.nativ/v5.5/" new File(path2).eachFileMatch(~/.*.a7/) { Build.add(it.getName()) } if(Build){ return Build } else { return ["There is no file to display"] }