Skip to content

Commit

Permalink
Merge pull request #381 from NipunaMadhushan/fix-windows-failure
Browse files Browse the repository at this point in the history
Fix 'bal dist pull' failure in windows
  • Loading branch information
NipunaMadhushan authored Jan 8, 2025
2 parents 75e5fa5 + becc7a5 commit 641cc3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=org.ballerinalang
version=1.4.5-SNAPSHOT
version=1.5.0-SNAPSHOT
ballerinaJreVersion=1.1.0
jreVersion=21.0.5+11-jre

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,12 @@ public static String encodePlusCharacters(String dependency) {
private static void addExecutablePermissionToDirectory(String filePath) {
Process process;
try {
process = Runtime.getRuntime().exec("chmod -R 755 " + filePath);
if (OSUtils.isWindows()) {
process = Runtime.getRuntime().exec("icacls " + filePath + " /grant Everyone:(OI)(CI)RX /T");
}
else {
process = Runtime.getRuntime().exec("chmod -R 755 " + filePath);
}
process.waitFor();
} catch (InterruptedException | IOException e) {
throw ErrorUtil.createCommandException("permission denied: you do not have write access to '" + filePath
Expand Down

0 comments on commit 641cc3b

Please sign in to comment.