-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaicommit-config.mjs
More file actions
executable file
·40 lines (33 loc) · 1.03 KB
/
Copy pathaicommit-config.mjs
File metadata and controls
executable file
·40 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env node
/**
* Configuration setup script wrapper
* This script makes it easier to run the configuration setup
*/
import { fileURLToPath } from 'url';
import path from 'path';
import fs from 'fs';
import child_process from 'child_process';
// Get __dirname equivalent in ESM
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Path to setup-config.mjs
const setupScriptPath = path.resolve(__dirname, 'scripts', 'setup', 'setup-config.mjs');
// Check if setup script exists
if (!fs.existsSync(setupScriptPath)) {
console.error(`Setup script not found at: ${setupScriptPath}`);
process.exit(1);
}
// Run setup script
try {
const result = child_process.spawnSync('node', [setupScriptPath], {
stdio: 'inherit',
shell: true
});
if (result.status !== 0) {
console.error('Configuration setup failed with exit code:', result.status);
process.exit(result.status);
}
} catch (error) {
console.error('Error running configuration setup:', error);
process.exit(1);
}