diff options
| author | William Boman <william@redwill.se> | 2022-07-10 16:39:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-10 14:39:35 +0000 |
| commit | da3cac4632322a62ef9f2551e1b790c557d88e7d (patch) | |
| tree | 8ab9745d8252b93bd6c36604ceb57e2e6f551ae0 /lua/mason-core/platform.lua | |
| parent | fix(node-debug2-adapter): fix build on Node >= 18 (#47) (diff) | |
| download | mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.tar mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.tar.gz mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.tar.bz2 mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.tar.lz mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.tar.xz mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.tar.zst mason-da3cac4632322a62ef9f2551e1b790c557d88e7d.zip | |
refactor: return table with declarative keys (#48)
Diffstat (limited to 'lua/mason-core/platform.lua')
| -rw-r--r-- | lua/mason-core/platform.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/mason-core/platform.lua b/lua/mason-core/platform.lua index 7ae51a67..987e70bf 100644 --- a/lua/mason-core/platform.lua +++ b/lua/mason-core/platform.lua @@ -164,7 +164,7 @@ function M.get_node_version() return spawn.node({ "--version" }):map(function(result) -- Parses output such as "v16.3.1" into major, minor, patch local _, _, major, minor, patch = _.head(_.split("\n", result.stdout)):find "v(%d+)%.(%d+)%.(%d+)" - return { tonumber(major), tonumber(minor), tonumber(patch) } + return { major = tonumber(major), minor = tonumber(minor), patch = tonumber(patch) } end) end |
