Skip to content

Commit 52bdefc

Browse files
committed
added missing if
1 parent 823addc commit 52bdefc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/groovy/com/rundeck/plugins/ansible/ansible/AnsibleRunner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,9 @@ public int run() throws Exception {
515515
if (type == AnsibleCommand.AdHoc){
516516
processEnvironment.put("ANSIBLE_LOAD_CALLBACK_PLUGINS", "1");
517517
processEnvironment.put("ANSIBLE_CALLBACKS_ENABLED", "ansible.builtin.tree");
518-
processEnvironment.put("ANSIBLE_CALLBACK_TREE_DIR", baseDirectory.toFile().getAbsolutePath());
518+
if (baseDirectory != null) {
519+
processEnvironment.put("ANSIBLE_CALLBACK_TREE_DIR", baseDirectory.toFile().getAbsolutePath());
520+
}
519521
}
520522

521523
if (configFile != null && !configFile.isEmpty()) {

0 commit comments

Comments
 (0)