Skip to content

Commit

Permalink
Merge pull request #325 from udda1996/validate-update-cycle
Browse files Browse the repository at this point in the history
Fix JRE-17 executable permissions
  • Loading branch information
keizer619 authored Oct 12, 2023
2 parents 38ce38e + 2372c8e commit cbd3693
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions resources/scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ then
\cp $CURRENT_PATH/ballerina-command-@version@/scripts/_bal $CURRENT_PATH/../scripts
fi

if [ -d "$CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre" ]
then
chmod -R 755 $CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre
fi

if [ $? -ne '0' ]; then
echo "error occurred while copying completion script files."
fi
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,7 @@ private static void downloadAndSetupDependency(HttpURLConnection conn, PrintStre
zipFile = Paths.get(zipFileLocation).toFile();
downloadFile(conn, zipFileLocation, dependency, printStream);
unzip(zipFileLocation, dependencyLocation);
if(OSUtils.isMac()) {
addExecutablePermissionToDirectory(dependencyLocation + File.separator + dependency);
} else {
addExecutablePermissionToFile(new File(dependencyLocation + File.separator + dependency
+ File.separator + "bin" + File.separator + "java"));
}
addExecutablePermissionToDirectory(dependencyLocation + File.separator + dependency);
if (zipFile.exists()) {
zipFile.delete();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void projectTestWithLatestSpec() throws IOException, InterruptedException
args.remove(args.size() - 1);
args.add("run");
output = TestUtils.executeCommand(args, projectPath);
// Assert.assertTrue(output.contains("Hello, World!"));
Assert.assertTrue(output.contains("Hello, World!"));
}

@Test(description = "Test dist list command.", dependsOnMethods = {"testUseCommand"})
Expand Down

0 comments on commit cbd3693

Please sign in to comment.