From a737b56704cf1cd90ecb3297bf42fb7328f9ab54 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:53:28 +0200 Subject: [PATCH] fix: sync config generator script corrupting cas data --- lune/rojo/roblox_sync_config_generator.luau | 4 ++++ lune/rojo/sourcemap_generator.luau | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lune/rojo/roblox_sync_config_generator.luau b/lune/rojo/roblox_sync_config_generator.luau index 63e41ba..d6d4d7c 100644 --- a/lune/rojo/roblox_sync_config_generator.luau +++ b/lune/rojo/roblox_sync_config_generator.luau @@ -4,6 +4,10 @@ local serde = require("@lune/serde") local package_directory = process.args[1] +if fs.isFile(package_directory .. "/default.project.json") then + return +end + local output = { tree = {}, } diff --git a/lune/rojo/sourcemap_generator.luau b/lune/rojo/sourcemap_generator.luau index a4c6a79..934570d 100644 --- a/lune/rojo/sourcemap_generator.luau +++ b/lune/rojo/sourcemap_generator.luau @@ -2,11 +2,11 @@ local process = require("@lune/process") local fs = require("@lune/fs") local stdio = require("@lune/stdio") -local project_path = process.args[1] +local package_directory = process.args[1] -if fs.isFile(project_path .. "/default.project.json") then - process.spawn("rojo", { "sourcemap", project_path }, { cwd = process.cwd, stdio = "forward" }) +if fs.isFile(package_directory .. "/default.project.json") then + process.spawn("rojo", { "sourcemap", package_directory }, { cwd = process.cwd, stdio = "forward" }) else -- use stderr to avoid this being parsed as the output of the sourcemap command - stdio.ewrite("no default.project.json found in " .. project_path) + stdio.ewrite("no default.project.json found in " .. package_directory) end