mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
07.29.2019 7325f6c31e1f7f6bd94a9e01e916de2c355bcae1
borgbutler-core/src/main/java/de/micromata/borgbutler/jobs/AbstractCommandLineJob.java
@@ -141,11 +141,22 @@
    }
    /**
     *
     * @param env
     * @param variable Variable in format "variable=value".
     */
    protected void addEnvironmentVariable(Map<String, String> env, String variable) {
        if (StringUtils.isNotBlank(variable)) {
            EnvironmentUtils.addVariableToEnvironment(env, variable);
        }
    }
    /**
     * Frees the output streams.
     * Should be called after a job was done, failed or cancelled while running.
     */
    public void cleanUp() {
        log.info("Freeing resources of job: " + commandLineAsString);
        log.debug("Freeing resources of job: " + commandLineAsString);
        outputStream = null;
        errorOutputStream = null;
    }