mirror of
https://github.com/pesde-pkg/tooling.git
synced 2024-12-12 07:10:36 +00:00
feat: use dev mode based on env var
This commit is contained in:
parent
94706f8a9d
commit
a66bc94eb7
2 changed files with 2 additions and 3 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"luau-lsp.require.mode": "relativeToFile",
|
"luau-lsp.sourcemap.enabled": false,
|
||||||
"luau-lsp.require.directoryAliases": {
|
"luau-lsp.require.directoryAliases": {
|
||||||
"@lune/": "~/.lune/.typedefs/0.8.9/"
|
"@lune/": "~/.lune/.typedefs/0.8.9/"
|
||||||
},
|
},
|
||||||
|
|
|
@ -218,7 +218,7 @@ function installTool(tool: ToolId)
|
||||||
local TOOL_PATH = "%s"
|
local TOOL_PATH = "%s"
|
||||||
--TOOL_PATH_END--
|
--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 "/"
|
local PLATFORM_SEP = if process.platform == "windows" then "\\" else "/"
|
||||||
|
|
||||||
-- TODO: Check whether we are being run as `pesde x` and skip this check
|
-- 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 selfPathInfo = debug.info(1, "s")
|
||||||
local selfPath = string.sub(selfPathInfo, 10, #selfPathInfo - 2)
|
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 manifestContents = fs.readFile(`{process.cwd}{PLATFORM_SEP}pesde.toml`)
|
||||||
local ok, manifest = pcall(serde.decode, "toml", manifestContents)
|
local ok, manifest = pcall(serde.decode, "toml", manifestContents)
|
||||||
if not ok then
|
if not ok then
|
||||||
|
|
Loading…
Reference in a new issue