Updates
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user