diff --git a/src/main/java/nz/co/jammehcow/jenkinsdiscord/DiscordPipelineStep.java b/src/main/java/nz/co/jammehcow/jenkinsdiscord/DiscordPipelineStep.java index 58e0180..b51f96c 100644 --- a/src/main/java/nz/co/jammehcow/jenkinsdiscord/DiscordPipelineStep.java +++ b/src/main/java/nz/co/jammehcow/jenkinsdiscord/DiscordPipelineStep.java @@ -296,6 +296,9 @@ protected Void run() throws Exception { private InputStream getFileInputStream(String file) throws IOException, InterruptedException { FilePath ws = getContext().get(FilePath.class); + if (ws == null) { + throw new IllegalStateException("Could not acquire FilePath"); + } final FilePath fp = ws.child(file); if (fp.exists()) { try {