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

[v3] Correct detection of npm with acceptable version #3458

Merged
merged 2 commits into from
May 5, 2024

Conversation

pekim
Copy link

@pekim pekim commented May 5, 2024

Description

The doctor command reports # Diagnosis WARNING There are some items above that need addressing! if npm is not found with the system package manager, but is found to be available on the path with exec.Command.

Not only is there the warning, but there is nothing in the doctor output to indicate what the problem is. That's because there isn't really a problem, it's just that the fact that npm has been found is not propagated back to the caller of checkCommonDependencies.

# System
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Name         | Fedora Linux                                                                                      |
| Version      | 39                                                                                                |
| ID           | fedora                                                                                            |
| Branding     | 39 (Workstation Edition)                                                                          |
| Platform     | linux                                                                                             |
| Architecture | amd64                                                                                             |
| CPU          | AMD Ryzen 7 5800X 8-Core Processor                                                                |
| GPU 1        | Navi 24 [Radeon RX 6400/6500 XT/6500M] (Advanced Micro Devices, Inc. [AMD/ATI]) - Driver: amdgpu  |
| Memory       | 32GB                                                                                              |
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Build Environment
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha.4                                                                 |
| Go Version     | go1.22.2                                                                       |
| Revision       | 2c29e1ca76b21615dd707eb17600a265e0ff3e7b                                       |
| Modified       | false                                                                          |
| -buildmode     | exe                                                                            |
| -compiler      | gc                                                                             |
| CGO_CFLAGS     |                                                                                |
| CGO_CPPFLAGS   |                                                                                |
| CGO_CXXFLAGS   |                                                                                |
| CGO_ENABLED    | 1                                                                              |
| CGO_LDFLAGS    |                                                                                |
| DefaultGODEBUG | httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1 |
| GOAMD64        | v1                                                                             |
| GOARCH         | amd64                                                                          |
| GOOS           | linux                                                                          |
| vcs            | git                                                                            |
| vcs.modified   | false                                                                          |
| vcs.revision   | 2c29e1ca76b21615dd707eb17600a265e0ff3e7b                                       |
| vcs.time       | 2024-05-05T07:27:53Z                                                           |
└─────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌───────────────────────────┐
| gcc        | 13.2.1       |
| libgtk-3   | 3.24.41      |
| libwebkit  | 2.44.1       |
| npm        | 10.7.0       |
| pkg-config | 1.9.5        |
└─ * - Optional Dependency ─┘

# Diagnosis
 WARNING  There are some items above that need addressing!

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Running wails3 doctor once the fix has been applied, result in the correct SUCCESS message.

# System
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| Name         | Fedora Linux                                                                                      |
| Version      | 39                                                                                                |
| ID           | fedora                                                                                            |
| Branding     | 39 (Workstation Edition)                                                                          |
| Platform     | linux                                                                                             |
| Architecture | amd64                                                                                             |
| CPU          | AMD Ryzen 7 5800X 8-Core Processor                                                                |
| GPU 1        | Navi 24 [Radeon RX 6400/6500 XT/6500M] (Advanced Micro Devices, Inc. [AMD/ATI]) - Driver: amdgpu  |
| Memory       | 32GB                                                                                              |
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Build Environment
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha.4                                                                 |
| Go Version     | go1.22.2                                                                       |
| Revision       | 097e0f19d56afb072d80bcc590aafecd942847c7                                       |
| Modified       | false                                                                          |
| -buildmode     | exe                                                                            |
| -compiler      | gc                                                                             |
| CGO_CFLAGS     |                                                                                |
| CGO_CPPFLAGS   |                                                                                |
| CGO_CXXFLAGS   |                                                                                |
| CGO_ENABLED    | 1                                                                              |
| CGO_LDFLAGS    |                                                                                |
| DefaultGODEBUG | httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1 |
| GOAMD64        | v1                                                                             |
| GOARCH         | amd64                                                                          |
| GOOS           | linux                                                                          |
| vcs            | git                                                                            |
| vcs.modified   | false                                                                          |
| vcs.revision   | 097e0f19d56afb072d80bcc590aafecd942847c7                                       |
| vcs.time       | 2024-05-05T15:04:29Z                                                           |
└─────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌───────────────────────────┐
| libgtk-3   | 3.24.41      |
| libwebkit  | 2.44.1       |
| npm        | 10.7.0       |
| pkg-config | 1.9.5        |
| gcc        | 13.2.1       |
└─ * - Optional Dependency ─┘

# Diagnosis
 SUCCESS  Your system is ready for Wails development!
  • Windows
  • macOS
  • Linux

Test Configuration

See the above two outputs of doctor, before and after the fix.

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@leaanthony leaanthony merged commit 0833a6d into wailsapp:v3-alpha May 5, 2024
4 checks passed
@leaanthony
Copy link
Member

Thanks for taking the time to fix this! 🙏

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.

2 participants