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 ccsh cli problems by providings custom bin-links for the gradle executables #2600 #3354

Merged
merged 8 commits into from
Aug 3, 2023

Conversation

phanlezz
Copy link
Collaborator

@phanlezz phanlezz commented Aug 1, 2023

Provide custom bin-links for gradle executables

Closes #2600

Description

This PR provides a set of two bin-links scripts. Each sets contains three scripts (bin-links) that then call the correct bin script to execute ccsh. There are two ccsh-scripts produced by gradle, one for unix and one for windows, that need to be callled / linked in different ways.
Npm generates three links to those gradle scripts on package install. Sadly, npm does not provide any native method to change the behavior of those scripts, so this PR introduces custom scripts / bin-links. Those scripts are modified versions of the generated links.
Via a postinstall lifecycle call the modified links get copied to the npm directory. The location varies for a local or a global install.

The original issue was probably caused by broken java paths, because either the environment expected windows paths (\) and got unix versions (/) or vice-versa.
This fix enables direct and native execution of those gradle scripts, without any node calls or nested executions.

@phanlezz phanlezz self-assigned this Aug 1, 2023
Copy link
Collaborator

@ce-bo ce-bo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

analysis/node-wrapper/package.json Outdated Show resolved Hide resolved
analysis/node-wrapper/install.js Outdated Show resolved Hide resolved
analysis/node-wrapper/install.js Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 3, 2023

[CodeCharta Analysis] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.14) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@sonarcloud
Copy link

sonarcloud bot commented Aug 3, 2023

[CodeCharta Visualization] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.14) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@phanlezz phanlezz merged commit e4ceda9 into main Aug 3, 2023
@phanlezz phanlezz deleted the fix/2600/broken-ccsh-command-under-windows branch August 3, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken codecharta-anlysis npm package / ccsh command
3 participants