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

Inconsistent file permissions in generated Quarkus Maven project. #44

Closed
xorye opened this issue Aug 23, 2019 · 0 comments · Fixed by #48
Closed

Inconsistent file permissions in generated Quarkus Maven project. #44

xorye opened this issue Aug 23, 2019 · 0 comments · Fixed by #48
Labels
bug Something isn't working

Comments

@xorye
Copy link
Contributor

xorye commented Aug 23, 2019

When generating a Maven project by calling 'Quarkus: Generate a Maven project' in the command palette, the final project that is generated has different file permissions that the project files generated and extracted from the downloaded zip from https://code.quarkus.io/.

Permissions from project files generated from vscode-quarkus:
image

Permissions from project files downloaded from https://code.quarkus.io/ as a zip, then extracted:
image

Most notably, the project files generated from vscode-quarkus does not have execute permissions for the maven wrapper files.

This is because when vscode-quarkus extracts the downloaded project zip, the file stream writer that is responsible for writing the extracted files onto the disk will revoke execute permissions by default.

One possible solution would be to tell the writer to give certain permissions to all files being written:

const options = {
  path: <DESTINATION PATH>,
  getWriter: (pathObject) => {
    return Writer({ path: pathObject.path, mode: 0755});
  }
};

request(<ENDPOINT URL>).pipe(unzipper.Extract(options));

This code snippet results in these permissions:
image

This gives 755 permissions to all files being written, including files located in subdirectories, which might not be desired.
image

@xorye xorye added the bug Something isn't working label Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant