Skip to content

Commit

Permalink
Fix permission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
keizer619 committed Jun 20, 2020
1 parent bff2783 commit 2e0bc28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public static boolean downloadDistribution(PrintStream printStream, String distr
conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("user-agent",
OSUtils.getUserAgent(distributionVersion, ToolUtil.getCurrentToolsVersion(),
OSUtils.getUserAgent(getCurrentBallerinaVersion(), ToolUtil.getCurrentToolsVersion(),
distributionType));
conn.setRequestProperty("Accept", "application/json");
if (conn.getResponseCode() == 302) {
Expand Down Expand Up @@ -458,8 +458,8 @@ private static void downloadAndSetupDist(PrintStream printStream, HttpURLConnect
String zipFileLocation = getDistributionsPath() + File.separator + distribution + ".zip";
downloadFile(conn, zipFileLocation, distribution, printStream);
unzip(zipFileLocation, distPath);
addExecutablePermissionToFile(new File(distPath + File.separator + distribution
+ File.separator + "bin"
addExecutablePermissionToFile(new File(distPath + File.separator + ToolUtil.getType(distribution)
+ "-" + distribution + File.separator + "bin"
+ File.separator + OSUtils.getExecutableFileName()));


Expand Down

0 comments on commit 2e0bc28

Please sign in to comment.