Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit b046ad8

Browse files
authored
Merge pull request #6 from YaoZengzeng/hypercli-related
launch hyper cli from absolute path
2 parents f80159e + 8a35845 commit b046ad8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/hyperbuildstep/hyperbuildstepplugin/drivers/CliHyperDriver.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ public boolean checkImageExists(Launcher launcher, String image) throws IOExcept
9696
}
9797

9898
public void prependArgs(ArgumentListBuilder args) {
99-
args.prepend("hyper");
99+
String hyperCliPath = System.getenv("HOME") + "/hyper";
100+
101+
if (System.getenv("HUDSON_HOME") != null) {
102+
hyperCliPath = System.getenv("HUDSON_HOME") + "/bin/hyper";
103+
}
104+
105+
args.prepend(hyperCliPath);
100106
}
101107

102108
private Launcher.ProcStarter launchHyperCLI(Launcher launcher, ArgumentListBuilder args) {

0 commit comments

Comments
 (0)