This commit is contained in:
Benjamin Toby
2025-07-15 10:02:20 +01:00
parent 8865292893
commit a71614cb0f
18 changed files with 99 additions and 34 deletions
+9 -4
View File
@@ -7,15 +7,20 @@ import handleEnvVars from "./utils/env";
import { TurboSyncConfigArray } from "./types";
declare global {
var SYNCING: boolean;
var SYNC_SUCCESS_EXIT_CODE: number;
var CONFIG_DIR: string;
var SYNCING_FILE: string;
}
global.SYNCING = false;
global.SYNC_SUCCESS_EXIT_CODE = 32;
const confFileProvidedPath = process.argv[process.argv.length - 1];
global.CONFIG_DIR = process.cwd();
global.SYNCING_FILE = path.join(global.CONFIG_DIR, "syncing.txt");
if (fs.existsSync(global.SYNCING_FILE)) {
fs.unlinkSync(global.SYNCING_FILE);
}
if (confFileProvidedPath === "--version" || confFileProvidedPath === "-v") {
try {
const packageJson = fs.readFileSync(