Skip to content

Commit

Permalink
PAYARA-1714 coorected path location so it will work wherever the outf…
Browse files Browse the repository at this point in the history
…ile is
  • Loading branch information
Cousjava committed Jul 23, 2018
1 parent 1ffc6fe commit afaa954
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
*/
package com.sun.enterprise.v3.admin;

import com.sun.enterprise.util.OS;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
Expand Down Expand Up @@ -104,7 +105,7 @@ public class GenerateBashAutoCompletionCommand implements AdminCommand {
+ "\n"
+ "}\n";
private static final String COMPLETE_CALL = "complete -F _asadmin asadmin";
private static final String ADD_PATH = "PATH=$PATH:$(pwd)";
private static final String ADD_PATH = "PATH=$PATH:";

private static final String DEFAULT_FILE = File.separator + "bin" + File.separator + "bash_autocomplete";

Expand Down Expand Up @@ -182,8 +183,9 @@ private boolean writeCommands(List<String> commands) {
//write function to tell bash what function the autocompletion is for
writer.write(COMPLETE_CALL);
writer.newLine();
//Add bin directory of Payara to the path
//Add directory of payara5/glassfish/bin to the path
writer.write(ADD_PATH);
writer.write(serverContext.getInstallRoot().getPath() + File.separator + "bin");
//flush the buffer
writer.flush();
return true;
Expand Down

0 comments on commit afaa954

Please sign in to comment.