Skip to content

docs: fix values for RUNTIME.osType and RUNTIME.archType. Simplify examples#8785

Merged
jdx merged 3 commits intojdx:mainfrom
esteve:fix-ostype-values
Apr 2, 2026
Merged

docs: fix values for RUNTIME.osType and RUNTIME.archType. Simplify examples#8785
jdx merged 3 commits intojdx:mainfrom
esteve:fix-ostype-values

Conversation

@esteve
Copy link
Copy Markdown
Contributor

@esteve esteve commented Mar 26, 2026

This is a continuation of #6732, some of the documentation still was inconsistent with the code. I've also simplified some of the examples.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR corrects RUNTIME.osType and RUNTIME.archType documentation values in two plugin-development guides to match the actual values returned by the Rust os() and arch() functions in crates/vfox/src/config.rs (lowercase "windows"/"linux"/"darwin" and "amd64"/"arm64"/"x86"). It also simplifies multi-branch if-else chains in code examples into compact ternary-style Lua expressions and removes the now-irrelevant "386" arch case (Rust reports 32-bit x86 as "x86", not "386").

Confidence Score: 5/5

Safe to merge — documentation-only corrections that align with the actual runtime values.

All changes are documentation fixes verified against the Rust source in crates/vfox/src/config.rs. The os() function returns lowercase values ("darwin", "linux", "windows") and arch() returns "amd64"/"arm64"/as-is, exactly matching what the docs now say. No logic, tests, or production code are modified. The previously flagged inconsistency between the two docs files is resolved in this PR.

No files require special attention.

Important Files Changed

Filename Overview
docs/backend-plugin-development.md Corrects RUNTIME.osType example from "Windows" to "windows" and updates the reference table to list lowercase OS values and quoted arch values including "x86".
docs/tool-plugin-development.md Fixes all "Windows"/"Darwin" comparisons to lowercase, removes the unreachable "386" arch branch, simplifies verbose if-elseif chains to single-expression Lua ternaries, and updates the RUNTIME reference table.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[RUNTIME.osType] -->|"== 'windows'"| B["'win' (get_os)\n'zip' extension\nWindows paths"]
    A -->|other| C["RUNTIME.osType as-is\n('linux', 'darwin', ...)"]

    D[RUNTIME.archType] -->|"== 'amd64'"| E["'x64'"]
    D -->|other| F["RUNTIME.archType as-is\n('arm64', 'x86', ...)"]
Loading

Reviews (5): Last reviewed commit: "apply gemini-code-assist suggestions" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation and example code to use lowercase values for RUNTIME.osType and RUNTIME.archType, ensuring consistency with the runtime's behavior. It also simplifies several architecture and OS mapping functions by removing redundant conditional branches. The review feedback suggests further refining these examples by using Lua's and/or idiom for more concise conditional assignments and return statements.

@esteve esteve force-pushed the fix-ostype-values branch from 8661b65 to e3df5fe Compare March 31, 2026 15:38
esteve and others added 3 commits April 2, 2026 14:39
examples

Signed-off-by: Esteve Fernandez <esteve@apache.org>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve esteve force-pushed the fix-ostype-values branch from 530fc52 to aa3291e Compare April 2, 2026 12:44
@esteve
Copy link
Copy Markdown
Contributor Author

esteve commented Apr 2, 2026

@jdx I've rebased this PR on top of main and applied the suggestions provided by gemini-code-assist in aa3291e, let me know if there's anything else that should be improved. Thanks.

@jdx jdx merged commit a77a7b5 into jdx:main Apr 2, 2026
35 checks passed
@esteve esteve deleted the fix-ostype-values branch April 2, 2026 16:20
mise-en-dev added a commit that referenced this pull request Apr 3, 2026
### 🚀 Features

- **(exec)** add process sandboxing for mise x and mise run by @jdx in
[#8845](#8845)

### 📚 Documentation

- fix values for RUNTIME.osType and RUNTIME.archType. Simplify examples
by @esteve in [#8785](#8785)

### 📦️ Dependency Updates

- update ghcr.io/jdx/mise:copr docker digest to 6dd31ee by
@renovate[bot] in [#8860](#8860)
- update ghcr.io/jdx/mise:alpine docker digest to 4b8b285 by
@renovate[bot] in [#8859](#8859)
- update ghcr.io/jdx/mise:deb docker digest to 56ddc49 by @renovate[bot]
in [#8861](#8861)
- update ghcr.io/jdx/mise:rpm docker digest to b37cc3b by @renovate[bot]
in [#8862](#8862)

### New Contributors

- @esteve made their first contribution in
[#8785](#8785)
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