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

Use standard util for setting POSIX file permissions #4921

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import software.amazon.awssdk.utils.UserHomeDirectoryUtils
import software.aws.toolkits.core.utils.createParentDirectories
import software.aws.toolkits.core.utils.exists
import software.aws.toolkits.core.utils.filePermissions
import software.aws.toolkits.core.utils.getLogger
import software.aws.toolkits.core.utils.info
import software.aws.toolkits.core.utils.tryDirOp
Expand Down Expand Up @@ -163,9 +164,9 @@
}
}
}
if (manifestManager.currentOs != "windows") {
makeFileExecutable(nodePath)
}

makeFileExecutable(nodePath)

Check warning on line 168 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/EncoderServer.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/EncoderServer.kt#L168

Added line #L168 was not covered by tests

val files = cachePath.toFile().listFiles()
if (files.isNotEmpty()) {
val filenames = files.map { it.name }
Expand Down Expand Up @@ -224,7 +225,7 @@
PosixFilePermission.OTHERS_READ,
PosixFilePermission.OTHERS_EXECUTE,
)
Files.setPosixFilePermissions(filePath, permissions)
filePath.filePermissions(permissions)

Check warning on line 228 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/EncoderServer.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/EncoderServer.kt#L228

Added line #L228 was not covered by tests
}

private fun unzipFile(zipFilePath: Path, destDir: Path) {
Expand Down

This file was deleted.

Loading