From d132a7a673d43b2da73f75e09fbe7fb49c431514 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 9 Jul 2022 01:00:34 +0200 Subject: chore(workflow): modularize scripts and remove mason-lspconfig from CI checks (#36) --- scripts/lua/mason-scripts/utils.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/lua/mason-scripts/utils.lua (limited to 'scripts/lua/mason-scripts/utils.lua') diff --git a/scripts/lua/mason-scripts/utils.lua b/scripts/lua/mason-scripts/utils.lua new file mode 100644 index 00000000..771d419a --- /dev/null +++ b/scripts/lua/mason-scripts/utils.lua @@ -0,0 +1,21 @@ +local fs = require "mason-core.fs" + +local M = {} + +---@async +---@param path string +---@param contents string +---@param flags string +function M.write_file(path, contents, flags) + fs.async.write_file( + path, + table.concat({ + "-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY.", + "-- stylua: ignore start", + contents, + }, "\n"), + flags + ) +end + +return M -- cgit v1.2.3-70-g09d2