private FilePath getSourceDirectory()

in src/main/java/com/amazonaws/codedeploy/AWSCodeDeployPublisher.java [269:280]


    private FilePath getSourceDirectory(FilePath basePath) throws IOException, InterruptedException {
        String subdirectory = StringUtils.trimToEmpty(getSubdirectoryFromEnv());
        if (!subdirectory.isEmpty() && !subdirectory.startsWith("/")) {
            subdirectory = "/" + subdirectory;
        }
        FilePath sourcePath = basePath.withSuffix(subdirectory).absolutize();
        if (!sourcePath.isDirectory() || !isSubDirectory(basePath, sourcePath)) {
            throw new IllegalArgumentException("Provided path (resolved as '" + sourcePath
                    +"') is not a subdirectory of the workspace (resolved as '" + basePath + "')");
        }
        return sourcePath;
    }