Skip to content
New issue

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

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

Already on GitHub? # to your account

Enhance error message returned by cli-test-utils when sh not on PATH #2208

Closed
t1m0thyj opened this issue Jul 25, 2024 · 1 comment · Fixed by #2209
Closed

Enhance error message returned by cli-test-utils when sh not on PATH #2208

t1m0thyj opened this issue Jul 25, 2024 · 1 comment · Fixed by #2209
Labels
enhancement New feature or request new The issue wasn't triaged yet

Comments

@t1m0thyj
Copy link
Member

Is your feature or enhancement request related to a problem or limitation? Please describe

In order to run CLI system tests with cli-test-utils on Windows, it is required to select the option below when installing Git Bash:
image

If this step is missed and Git Bash is installed with default options, then CLI system tests may fail with a cryptic error like TypeError: Cannot read properties of null (reading 'toString').

Describe your enhancement idea

To improve the experience for CLI plug-in developers, the cli-test-utils runScript method could detect if sh is missing from the PATH, and if show a more helpful error message such as:

Detected that "sh" is missing from your PATH.
If you are using Windows, ensure that Git Bash has been installed with the option to "Use Git and Unix Tools from Windows Command Prompt".

Describe alternatives you've considered

Open a Git Bash terminal to execute the npm command that runs system tests so that sh is present in the environment.

Provide any additional context

For CLI developers, we have documentation related to this in our readme:

In addition to Node.js, you must have a means to execute .sh (bash) scripts, which are required for running integration tests. On Windows, you can install "Git Bash" (bundled with the standard Git installation - check "Use Git and Unix Tools from Windows Command Prompt" installation option).

@t1m0thyj t1m0thyj added enhancement New feature or request new The issue wasn't triaged yet labels Jul 25, 2024
Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request new The issue wasn't triaged yet
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

1 participant