feat: use dev mode based on env var

This commit is contained in:
Erica Marigold 2024-11-23 15:59:22 +00:00
parent 94706f8a9d
commit a66bc94eb7
2 changed files with 2 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{
"luau-lsp.require.mode": "relativeToFile",
"luau-lsp.sourcemap.enabled": false,
"luau-lsp.require.directoryAliases": {
"@lune/": "~/.lune/.typedefs/0.8.9/"
},

View file

@ -218,7 +218,7 @@ function installTool(tool: ToolId)
local TOOL_PATH = "%s"
--TOOL_PATH_END--
local IS_DEV = true
local IS_DEV = process.env.PESDE_TOOLCHAIN_DEV ~= nil
local PLATFORM_SEP = if process.platform == "windows" then "\\" else "/"
-- TODO: Check whether we are being run as `pesde x` and skip this check
@ -226,7 +226,6 @@ function installTool(tool: ToolId)
local selfPathInfo = debug.info(1, "s")
local selfPath = string.sub(selfPathInfo, 10, #selfPathInfo - 2)
-- FIXME: Does the CWD have a trailing slash on all platforms?
local manifestContents = fs.readFile(`{process.cwd}{PLATFORM_SEP}pesde.toml`)
local ok, manifest = pcall(serde.decode, "toml", manifestContents)
if not ok then