Skip to content

Commit adbe6a3

Browse files
committed
U rename execute to executeOnDirectory
1 parent f34a5ea commit adbe6a3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/io/github/fvarrui/javapackager/packagers/GenerateAppImage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected File doApply(LinuxPackager packager) throws Exception {
7171

7272
// runs appimagetool on appFolder
7373
Logger.info("Running appimagetool on " + appFolder);
74-
CommandUtils.execute(
74+
CommandUtils.executeOnDirectory(
7575
appImageTool,
7676
"--appimage-extract-and-run",
7777
appDir,

src/main/java/io/github/fvarrui/javapackager/utils/CommandUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
public class CommandUtils {
1515

16-
public static String execute(File workingDirectory, String executable, Object... arguments) throws IOException, CommandLineException {
16+
public static String executeOnDirectory(File workingDirectory, String executable, Object... arguments) throws IOException, CommandLineException {
1717
ExecutionResult result = executeWithResult(workingDirectory, executable, arguments);
1818
if (result.getExitCode() != 0) {
1919
throw new CommandLineException("Command execution failed: " + executable + " " + StringUtils.join(arguments, " "));
@@ -26,7 +26,7 @@ public static String execute(File executable, Object... arguments) throws IOExce
2626
}
2727

2828
public static String execute(String executable, Object... arguments) throws IOException, CommandLineException {
29-
return execute(new File("."), executable, arguments);
29+
return executeOnDirectory(new File("."), executable, arguments);
3030
}
3131

3232
public static ExecutionResult executeWithResult(File workingDirectory, String executable, Object... arguments) throws IOException, CommandLineException {

src/main/java/io/github/fvarrui/javapackager/utils/JarUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class JarUtils {
99

1010
public static void addFileToJar(File jarFile, File newFile) throws IOException, CommandLineException {
1111
File jar = new File(System.getProperty("java.home"), "/bin/jar");
12-
CommandUtils.execute(newFile.getParentFile(), jar.getAbsolutePath(), "uf", jarFile, newFile.getName());
12+
CommandUtils.executeOnDirectory(newFile.getParentFile(), jar.getAbsolutePath(), "uf", jarFile, newFile.getName());
1313
}
1414

1515
}

0 commit comments

Comments
 (0)