mlgym-deploy 3.3.24 → 3.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1722,6 +1722,16 @@ async function initProject(args) {
|
|
|
1722
1722
|
|
|
1723
1723
|
// Initialize local git repository if needed
|
|
1724
1724
|
const absolutePath = path.resolve(local_path);
|
|
1725
|
+
|
|
1726
|
+
// Fix git "dubious ownership" error when running as different user
|
|
1727
|
+
// This allows git operations even if directory is owned by another user
|
|
1728
|
+
console.error('Configuring git safe.directory...');
|
|
1729
|
+
try {
|
|
1730
|
+
await execAsync(`git config --global --add safe.directory "${absolutePath}"`);
|
|
1731
|
+
} catch (safeErr) {
|
|
1732
|
+
console.error('Note: Could not set safe.directory:', safeErr.message);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1725
1735
|
try {
|
|
1726
1736
|
await execAsync('git status', { cwd: absolutePath });
|
|
1727
1737
|
console.error('Directory is already a git repository');
|
package/package.json
CHANGED