<commit_before>package org.jenkinsci.plugins.ansible;

import java.io.IOException;
import java.util.Map;

import hudson.Launcher;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.util.ArgumentListBuilder;

/**
 * Created with IntelliJ IDEA.
 * User: sirot
 * Date: 23/05/15
 * Time: 22:56
 * To change this template use File | Settings | File Templates.
 */
class CLIRunner
{
    private final Launcher launcher;
    private final AbstractBuild<?, ?> build;
    private final BuildListener listener;

    public CLIRunner(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) {
        this.launcher = launcher;
        this.build = build;
        this.listener = listener;
    }

    public boolean execute(ArgumentListBuilder args, Map<String, String> environment)
            throws IOException, InterruptedException
    {
        return launcher.launch()
                .pwd(build.getWorkspace())
                .envs(environment)
                .cmds(args)
                .stdout(listener).join() != 0;
    }
}<commit_msg>Fix build steps setting the build status to an incorrect value<commit_after>package org.jenkinsci.plugins.ansible;

import java.io.IOException;
import java.util.Map;

import hudson.Launcher;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.util.ArgumentListBuilder;

/**
 * Created with IntelliJ IDEA.
 * User: sirot
 * Date: 23/05/15
 * Time: 22:56
 * To change this template use File | Settings | File Templates.
 */
class CLIRunner
{
    private final Launcher launcher;
    private final AbstractBuild<?, ?> build;
    private final BuildListener listener;

    public CLIRunner(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) {
        this.launcher = launcher;
        this.build = build;
        this.listener = listener;
    }

    public boolean execute(ArgumentListBuilder args, Map<String, String> environment)
            throws IOException, InterruptedException
    {
        return launcher.launch()
                .pwd(build.getWorkspace())
                .envs(environment)
                .cmds(args)
                .stdout(listener).join() == 0;
    }
}
{'fraction_non_alphanumeric': 0.09670131043831902, 'fraction_numerical': 0.009941256213285133, 'mean_word_length': 2.9047619047619047, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6437560', 'n_tokens_mistral': 657, 'n_tokens_neox': 613, 'n_words': 164}