Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JRE-17 executable permissions #325

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading